Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-system
This commit is contained in:
commit
7be21f71f3
@ -15,6 +15,8 @@ public class BaseConstants {
|
||||
public static final String CUS_SIGN_CAR = "car";
|
||||
/**客户信息表名称*/
|
||||
public static final String TABLE_BASE_CUSTOMER_MAIN = "base_customer_main";
|
||||
/**车辆信息表名称*/
|
||||
public static final String TABLE_BASE_CAR_MAIN = "base_car_main";
|
||||
/**新增标识*/
|
||||
public static final String SIGN_CREATE = "create";
|
||||
/**编辑标识*/
|
||||
|
@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.cont.controller.admin;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Tag(name = "管理后台 - 数据项")
|
||||
@RestController
|
||||
@RequestMapping("/base/cont-data")
|
||||
@Validated
|
||||
public class BaseContDataController {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.iocoder.yudao.module.cont.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContTemp;
|
||||
import cn.iocoder.yudao.module.cont.service.BaseContTempService;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempPageReqVO;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 合同模板")
|
||||
@RestController
|
||||
@RequestMapping("/base/cont-temp")
|
||||
@Validated
|
||||
public class BaseContTempController {
|
||||
|
||||
@Resource
|
||||
private BaseContTempService contTempService;
|
||||
|
||||
|
||||
/**
|
||||
* 合同模板分页列表查询
|
||||
*
|
||||
* @param pageReqVO BaseContTempPageReqVO实体
|
||||
* @param pageNo 分页参数
|
||||
* @param pageSize 分页参数
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage < ?>>
|
||||
* @author PQZ
|
||||
* @date 10:46 2024/8/8
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得合同模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:cont-temp:query')")
|
||||
public CommonResult<IPage<?>> getContTempPage(BaseContTempPageReqVO pageReqVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<BaseContTempRespVO> page = new Page<>(pageNo, pageSize);
|
||||
return success(contTempService.getContTempPage(pageReqVO, page));
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建合同模板
|
||||
*
|
||||
* @param createReqVO BaseContTempSaveReqVO
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.String>
|
||||
* @author PQZ
|
||||
* @date 17:11 2024/8/8
|
||||
**/
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建合同模板")
|
||||
@PreAuthorize("@ss.hasPermission('base:cont-temp:create')")
|
||||
public CommonResult<Boolean> createContTemp(@Valid @RequestBody BaseContTempSaveReqVO createReqVO) {
|
||||
contTempService.saveConTemp(createReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑合同模板
|
||||
*
|
||||
* @param updateReqVO BaseContTempSaveReqVO
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 17:11 2024/8/8
|
||||
**/
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新合同模板")
|
||||
@PreAuthorize("@ss.hasPermission('base:cont-temp:update')")
|
||||
public CommonResult<Boolean> updateContTemp(@Valid @RequestBody BaseContTempSaveReqVO updateReqVO) {
|
||||
contTempService.saveConTemp(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除合同模板
|
||||
*
|
||||
* @param id 合同模板id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 17:12 2024/8/8
|
||||
**/
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除合同模板")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:cont-temp:delete')")
|
||||
public CommonResult<Boolean> deleteContTemp(@RequestParam("id") String id) {
|
||||
contTempService.deleteContTemp(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询合同模板
|
||||
*
|
||||
* @param id id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO>
|
||||
* @author PQZ
|
||||
* @date 17:12 2024/8/8
|
||||
**/
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得合同模板")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:cont-temp:query')")
|
||||
public CommonResult<BaseContTempRespVO> getContTemp(@RequestParam("id") String id) {
|
||||
BaseContTemp contTemp = contTempService.getContTemp(id);
|
||||
return success(BeanUtils.toBean(contTemp, BaseContTempRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.cont.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 数据项 DO
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@TableName("dl_base_cont_data")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseContData extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 合同模板id
|
||||
*/
|
||||
private String mainId;
|
||||
/**
|
||||
* 数据项名称
|
||||
*/
|
||||
private String itemName;
|
||||
/**
|
||||
* 数据项编码
|
||||
*/
|
||||
private String itemCode;
|
||||
/**
|
||||
* 数据项类型
|
||||
*/
|
||||
private String itemType;
|
||||
/**
|
||||
* 是否有效(0否1是)
|
||||
*/
|
||||
private String isValid;
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.cont.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 合同模板 DO
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@TableName("dl_base_cont_temp")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseContTemp extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 模板编号
|
||||
*/
|
||||
private String tempCode;
|
||||
/**
|
||||
* 模板类型
|
||||
*/
|
||||
private String tempType;
|
||||
/**
|
||||
* 模板用途
|
||||
*/
|
||||
private String tempUse;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String tempName;
|
||||
/**
|
||||
* 是否有效(0否;1是)
|
||||
*/
|
||||
private String isValid;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 模板内容
|
||||
*/
|
||||
private String tempContent;
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.cont.mapper;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContData;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 数据项 Mapper
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseContDataMapper extends BaseMapper<BaseContData> {
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.cont.mapper;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContTemp;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempPageReqVO;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 合同模板 Mapper
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseContTempMapper extends BaseMapper<BaseContTemp> {
|
||||
|
||||
|
||||
/**
|
||||
* 合同模板分页列表查询
|
||||
*
|
||||
* @param pageReqVO 合同模板pageReq扩展类
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO>
|
||||
* @author PQZ
|
||||
* @date 10:40 2024/8/8
|
||||
**/
|
||||
IPage<BaseContTempRespVO> selectListPage(@Param("entity") BaseContTempPageReqVO pageReqVO, Page<BaseContTempRespVO> page);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.cont.service;
|
||||
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContData;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 数据项 Service 接口
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
public interface BaseContDataService extends IService<BaseContData> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package cn.iocoder.yudao.module.cont.service;
|
||||
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContTemp;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempPageReqVO;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 合同模板 Service 接口
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
public interface BaseContTempService extends IService<BaseContTemp> {
|
||||
|
||||
|
||||
/**
|
||||
* 保存合同模板
|
||||
*
|
||||
* @param reqVo BaseContTempSaveReqVO
|
||||
* @return void
|
||||
* @author PQZ
|
||||
* @date 17:13 2024/8/8
|
||||
**/
|
||||
void saveConTemp(BaseContTempSaveReqVO reqVo);
|
||||
|
||||
/**
|
||||
* 删除合同模板
|
||||
*
|
||||
* @param id 模板id
|
||||
* @return void
|
||||
* @author PQZ
|
||||
* @date 17:16 2024/8/8
|
||||
**/
|
||||
void deleteContTemp(String id);
|
||||
|
||||
/**
|
||||
* 获得合同模板
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 合同模板
|
||||
*/
|
||||
BaseContTemp getContTemp(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 合同模板分页列表查询
|
||||
*
|
||||
* @param pageReqVO 请求参数
|
||||
* @param page Page分页
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO>
|
||||
* @author PQZ
|
||||
* @date 10:39 2024/8/8
|
||||
**/
|
||||
IPage<BaseContTempRespVO> getContTempPage(BaseContTempPageReqVO pageReqVO, Page<BaseContTempRespVO> page);
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.cont.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContData;
|
||||
import cn.iocoder.yudao.module.cont.mapper.BaseContDataMapper;
|
||||
import cn.iocoder.yudao.module.cont.service.BaseContDataService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 数据项 Service 实现类
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BaseContDataServiceImpl extends ServiceImpl<BaseContDataMapper, BaseContData> implements BaseContDataService {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package cn.iocoder.yudao.module.cont.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContTemp;
|
||||
import cn.iocoder.yudao.module.cont.mapper.BaseContTempMapper;
|
||||
import cn.iocoder.yudao.module.cont.service.BaseContTempService;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempPageReqVO;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO;
|
||||
import cn.iocoder.yudao.module.cont.vo.BaseContTempSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 合同模板 Service 实现类
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BaseContTempServiceImpl extends ServiceImpl<BaseContTempMapper, BaseContTemp> implements BaseContTempService {
|
||||
|
||||
@Resource
|
||||
private BaseContTempMapper contTempMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 保存合同模板
|
||||
*
|
||||
* @param reqVo BaseContTempSaveReqVO
|
||||
* @return void
|
||||
* @author PQZ
|
||||
* @date 17:13 2024/8/8
|
||||
**/
|
||||
@Override
|
||||
public void saveConTemp(BaseContTempSaveReqVO reqVo) {
|
||||
BaseContTemp saveObj = BeanUtils.toBean(reqVo, BaseContTemp.class);
|
||||
saveOrUpdate(saveObj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除合同模板
|
||||
*
|
||||
* @param id 模板id
|
||||
* @return void
|
||||
* @author PQZ
|
||||
* @date 17:16 2024/8/8
|
||||
**/
|
||||
@Override
|
||||
public void deleteContTemp(String id) {
|
||||
// 删除
|
||||
contTempMapper.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得合同模板
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 合同模板
|
||||
*/
|
||||
@Override
|
||||
public BaseContTemp getContTemp(String id) {
|
||||
return contTempMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 合同模板分页列表查询
|
||||
*
|
||||
* @param pageReqVO 请求参数
|
||||
* @param page Page分页
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO>
|
||||
* @author PQZ
|
||||
* @date 10:39 2024/8/8
|
||||
**/
|
||||
@Override
|
||||
public IPage<BaseContTempRespVO> getContTempPage(BaseContTempPageReqVO pageReqVO, Page<BaseContTempRespVO> page) {
|
||||
return contTempMapper.selectListPage(pageReqVO, page);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.cont.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContTemp;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 合同模板分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BaseContTempPageReqVO extends BaseContTemp {
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.cont.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContTemp;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 合同模板 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BaseContTempRespVO extends BaseContTemp {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.iocoder.yudao.module.cont.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.cont.entity.BaseContTemp;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 合同模板新增/修改 Request VO")
|
||||
@Data
|
||||
public class BaseContTempSaveReqVO extends BaseContTemp {
|
||||
|
||||
|
||||
}
|
@ -39,13 +39,13 @@ public class CarBrandController {
|
||||
private CarBrandService carBrandService;
|
||||
|
||||
/**
|
||||
* 创建车辆品牌维护
|
||||
* 创建车辆品牌
|
||||
*
|
||||
* @param createReqVO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建车辆品牌维护")
|
||||
@Operation(summary = "创建车辆品牌")
|
||||
@PreAuthorize("@ss.hasPermission('base:car-brand:create')")
|
||||
public CommonResult<String> createCarBrand(@RequestBody CarBrandReqVO createReqVO) {
|
||||
return success(carBrandService.createCarBrand(createReqVO));
|
||||
@ -58,7 +58,7 @@ public class CarBrandController {
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新车辆品牌维护")
|
||||
@Operation(summary = "更新车辆品牌")
|
||||
@PreAuthorize("@ss.hasPermission('base:car-brand:update')")
|
||||
public CommonResult<Boolean> updateCarBrand(@RequestBody CarBrandReqVO updateReqVO) {
|
||||
carBrandService.updateCarBrand(updateReqVO);
|
||||
@ -66,7 +66,7 @@ public class CarBrandController {
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除车辆品牌维护")
|
||||
@Operation(summary = "删除车辆品牌")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:car-brand:delete')")
|
||||
public CommonResult<Boolean> deleteCarBrand(@RequestParam("id") String id) {
|
||||
@ -75,7 +75,7 @@ public class CarBrandController {
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得车辆品牌维护")
|
||||
@Operation(summary = "获得车辆品牌")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:car-brand:query')")
|
||||
public CommonResult<CarBrandRespVO> getCarBrand(@RequestParam("id") String id) {
|
||||
@ -84,7 +84,7 @@ public class CarBrandController {
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得车辆品牌维护分页")
|
||||
@Operation(summary = "获得车辆品牌分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:car-brand:query')")
|
||||
public CommonResult<IPage<CarBrandRespVO>> getCarBrandPage(CarBrandReqVO pageReqVO) {
|
||||
IPage<CarBrandRespVO> pageResult = carBrandService.getCarBrandPage(pageReqVO);
|
||||
@ -92,7 +92,7 @@ public class CarBrandController {
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出车辆品牌维护 Excel")
|
||||
@Operation(summary = "导出车辆品牌 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:car-brand:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCarBrandExcel(CarBrandReqVO pageReqVO,
|
||||
|
@ -5,7 +5,9 @@ import cn.iocoder.yudao.module.custom.service.CarMainService;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarMainReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarMainRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO;
|
||||
import cn.iocoder.yudao.module.label.service.BusiLabelService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -16,8 +18,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.validation.Valid;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -25,6 +27,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import static cn.iocoder.yudao.common.BaseConstants.TABLE_BASE_CAR_MAIN;
|
||||
import static cn.iocoder.yudao.common.BaseConstants.TABLE_BASE_CUSTOMER_MAIN;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
@ -40,9 +44,12 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
@Validated
|
||||
public class CarMainController {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private CarMainService carMainService;
|
||||
|
||||
@Autowired
|
||||
private BusiLabelService busiLabelService;
|
||||
|
||||
/**
|
||||
* 创建车辆信息
|
||||
*
|
||||
@ -141,9 +148,24 @@ public class CarMainController {
|
||||
@PostMapping("/bindCustomerCar")
|
||||
@Operation(summary = "绑定用户")
|
||||
@PreAuthorize("@ss.hasPermission('base:car-main:bindCustomer')")
|
||||
public CommonResult<Boolean> bindCustomerCar(@RequestBody CustomerMainSaveReqVO saveReqVO) {
|
||||
public CommonResult<Boolean> bindCustomerCar(@RequestBody CarMainReqVO saveReqVO) {
|
||||
carMainService.bindCustomAndCar(saveReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置标签
|
||||
*
|
||||
* @param saveReqVO CustomerMainSaveReqVO
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 16:35 2024/8/6
|
||||
**/
|
||||
@PostMapping("/setLabel")
|
||||
@Operation(summary = "设置标签")
|
||||
public CommonResult<Boolean> setLabel(@RequestBody CarMainReqVO saveReqVO) {
|
||||
busiLabelService.saveBusiLable(saveReqVO.getId(), TABLE_BASE_CAR_MAIN, saveReqVO.getLabelList());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
@ -2,9 +2,7 @@ package cn.iocoder.yudao.module.custom.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.CarModel;
|
||||
import cn.iocoder.yudao.module.custom.service.CarModelService;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarMainRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarModelReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarModelRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.*;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarModelReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -137,8 +135,7 @@ public class CarModelController {
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出车辆品牌型号 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:car-model:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCarModelExcel(CarModelReqVO pageReqVO,
|
||||
public void searchBrand(CarModelReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CarModelRespVO> list = carModelService.getCarModelPage(pageReqVO).getRecords();
|
||||
@ -146,4 +143,19 @@ public class CarModelController {
|
||||
ExcelUtils.write(response, "车辆品牌型号.xls", "数据", CarModelRespVO.class, list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 筛选品牌型号
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/searchBrand")
|
||||
@Operation(summary = "获取品牌型号级联下拉")
|
||||
@PreAuthorize("@ss.hasPermission('base:car-main:query')")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<List<CascaderOptionsVO>> searchBrand(@RequestBody CarModelReqVO reqVO) {
|
||||
List<CascaderOptionsVO> result = carModelService.searchBrand(reqVO);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package cn.iocoder.yudao.module.custom.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.Property;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 企业管理-资产")
|
||||
@RestController
|
||||
@RequestMapping("/company/property")
|
||||
@Validated
|
||||
public class PropertyController {
|
||||
|
||||
@Resource
|
||||
private PropertyService propertyService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建企业管理-资产")
|
||||
@PreAuthorize("@ss.hasPermission('company:property:create')")
|
||||
public CommonResult<String> createProperty(@RequestBody PropertyReqVO createReqVO) {
|
||||
return success(propertyService.createProperty(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新企业管理-资产")
|
||||
@PreAuthorize("@ss.hasPermission('company:property:update')")
|
||||
public CommonResult<Boolean> updateProperty(@RequestBody PropertyReqVO updateReqVO) {
|
||||
propertyService.updateProperty(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除企业管理-资产")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('company:property:delete')")
|
||||
public CommonResult<Boolean> deleteProperty(@RequestParam("id") String id) {
|
||||
propertyService.deleteProperty(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得企业管理-资产")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('company:property:query')")
|
||||
public CommonResult<PropertyRespVO> getProperty(@RequestParam("id") String id) {
|
||||
Property property = propertyService.getProperty(id);
|
||||
return success(BeanUtils.toBean(property, PropertyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得企业管理-资产分页")
|
||||
@PreAuthorize("@ss.hasPermission('company:property:query')")
|
||||
public CommonResult<IPage<PropertyRespVO>> getPropertyPage(PropertyReqVO pageReqVO) {
|
||||
IPage<PropertyRespVO> pageResult = propertyService.getPropertyPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出企业管理-资产 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('company:property:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPropertyExcel(PropertyReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PropertyRespVO> list = propertyService.getPropertyPage(pageReqVO).getRecords();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "企业管理-资产.xls", "数据", PropertyRespVO.class, list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package cn.iocoder.yudao.module.custom.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyDealDO;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyDealService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 企业管理-资产处置单/变动单")
|
||||
@RestController
|
||||
@RequestMapping("/company/property-deal")
|
||||
@Validated
|
||||
public class PropertyDealController {
|
||||
|
||||
@Resource
|
||||
private PropertyDealService propertyDealService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建企业管理-资产处置单/变动单")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal:create')")
|
||||
public CommonResult<String> createPropertyDeal(@RequestBody PropertyDealReqVO createReqVO) {
|
||||
return success(propertyDealService.createPropertyDeal(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新企业管理-资产处置单/变动单")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal:update')")
|
||||
public CommonResult<Boolean> updatePropertyDeal(@RequestBody PropertyDealReqVO updateReqVO) {
|
||||
propertyDealService.updatePropertyDeal(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除企业管理-资产处置单/变动单")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal:delete')")
|
||||
public CommonResult<Boolean> deletePropertyDeal(@RequestParam("id") String id) {
|
||||
propertyDealService.deletePropertyDeal(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得企业管理-资产处置单/变动单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal:query')")
|
||||
public CommonResult<PropertyDealRespVO> getPropertyDeal(@RequestParam("id") String id) {
|
||||
PropertyDealDO propertyDeal = propertyDealService.getPropertyDeal(id);
|
||||
return success(BeanUtils.toBean(propertyDeal, PropertyDealRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得企业管理-资产处置单/变动单分页")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal:query')")
|
||||
public CommonResult<IPage<PropertyDealRespVO>> getPropertyDealPage(PropertyDealReqVO pageReqVO) {
|
||||
IPage<PropertyDealRespVO> propertyDealPage = propertyDealService.getPropertyDealPage(pageReqVO);
|
||||
return success(propertyDealPage);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出企业管理-资产处置单/变动单 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPropertyDealExcel(PropertyDealReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PropertyDealRespVO> list = propertyDealService.getPropertyDealPage(pageReqVO).getRecords();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "企业管理-资产处置单/变动单.xls", "数据", PropertyDealRespVO.class,list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package cn.iocoder.yudao.module.custom.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyDealItemDO;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyDealItemService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealItemReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealItemRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 企业管理-资产处置子")
|
||||
@RestController
|
||||
@RequestMapping("/company/property-deal-item")
|
||||
@Validated
|
||||
public class PropertyDealItemController {
|
||||
|
||||
@Resource
|
||||
private PropertyDealItemService propertyDealItemService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建企业管理-资产处置子")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:create')")
|
||||
public CommonResult<String> createPropertyDealItem(@RequestBody PropertyDealItemReqVO createReqVO) {
|
||||
return success(propertyDealItemService.createPropertyDealItem(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新企业管理-资产处置子")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:update')")
|
||||
public CommonResult<Boolean> updatePropertyDealItem(@RequestBody PropertyDealItemReqVO updateReqVO) {
|
||||
propertyDealItemService.updatePropertyDealItem(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除企业管理-资产处置子")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:delete')")
|
||||
public CommonResult<Boolean> deletePropertyDealItem(@RequestParam("id") String id) {
|
||||
propertyDealItemService.deletePropertyDealItem(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得企业管理-资产处置子")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:query')")
|
||||
public CommonResult<PropertyDealItemRespVO> getPropertyDealItem(@RequestParam("id") String id) {
|
||||
PropertyDealItemDO propertyDealItem = propertyDealItemService.getPropertyDealItem(id);
|
||||
return success(BeanUtils.toBean(propertyDealItem, PropertyDealItemRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得企业管理-资产处置子分页")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:query')")
|
||||
public CommonResult<IPage<PropertyDealItemRespVO>> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO) {
|
||||
IPage<PropertyDealItemRespVO> propertyDealItemPage = propertyDealItemService.getPropertyDealItemPage(pageReqVO);
|
||||
return success(propertyDealItemPage);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出企业管理-资产处置子 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPropertyDealItemExcel(PropertyDealItemReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PropertyDealItemRespVO> list = propertyDealItemService.getPropertyDealItemPage(pageReqVO).getRecords();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "企业管理-资产处置子.xls", "数据", PropertyDealItemRespVO.class,list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package cn.iocoder.yudao.module.custom.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyKeep;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyKeepService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyKeepReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyKeepRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 资产维修/保养记录")
|
||||
@RestController
|
||||
@RequestMapping("/company/property-keep")
|
||||
@Validated
|
||||
public class PropertyKeepController {
|
||||
|
||||
@Resource
|
||||
private PropertyKeepService propertyKeepService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建资产维修/保养记录")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-keep:create')")
|
||||
public CommonResult<String> createPropertyKeep(@RequestBody PropertyKeepReqVO createReqVO) {
|
||||
return success(propertyKeepService.createPropertyKeep(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新资产维修/保养记录")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-keep:update')")
|
||||
public CommonResult<Boolean> updatePropertyKeep(@RequestBody PropertyKeepReqVO updateReqVO) {
|
||||
propertyKeepService.updatePropertyKeep(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除资产维修/保养记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('company:property-keep:delete')")
|
||||
public CommonResult<Boolean> deletePropertyKeep(@RequestParam("id") String id) {
|
||||
propertyKeepService.deletePropertyKeep(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得资产维修/保养记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-keep:query')")
|
||||
public CommonResult<PropertyKeepRespVO> getPropertyKeep(@RequestParam("id") String id) {
|
||||
PropertyKeep propertyKeep = propertyKeepService.getPropertyKeep(id);
|
||||
return success(BeanUtils.toBean(propertyKeep, PropertyKeepRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得资产维修/保养记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-keep:query')")
|
||||
public CommonResult<IPage<PropertyKeepRespVO>> getPropertyKeepPage(PropertyKeepReqVO pageReqVO) {
|
||||
IPage<PropertyKeepRespVO> pageResult = propertyKeepService.getPropertyKeepPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出资产维修/保养记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-keep:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPropertyKeepExcel(PropertyKeepReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PropertyKeepRespVO> list = propertyKeepService.getPropertyKeepPage(pageReqVO).getRecords();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "资产维修/保养记录.xls", "数据", PropertyKeepRespVO.class, list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package cn.iocoder.yudao.module.custom.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyPosDO;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyPosService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyPosReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyPosRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 企业管理-资产存放位置")
|
||||
@RestController
|
||||
@RequestMapping("/company/property-pos")
|
||||
@Validated
|
||||
public class PropertyPosController {
|
||||
|
||||
@Resource
|
||||
private PropertyPosService propertyPosService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建企业管理-资产存放位置")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-pos:create')")
|
||||
public CommonResult<String> createPropertyPos(@RequestBody PropertyPosReqVO createReqVO) {
|
||||
return success(propertyPosService.createPropertyPos(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新企业管理-资产存放位置")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-pos:update')")
|
||||
public CommonResult<Boolean> updatePropertyPos(@RequestBody PropertyPosReqVO updateReqVO) {
|
||||
propertyPosService.updatePropertyPos(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除企业管理-资产存放位置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('company:property-pos:delete')")
|
||||
public CommonResult<Boolean> deletePropertyPos(@RequestParam("id") String id) {
|
||||
propertyPosService.deletePropertyPos(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得企业管理-资产存放位置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-pos:query')")
|
||||
public CommonResult<PropertyPosRespVO> getPropertyPos(@RequestParam("id") String id) {
|
||||
PropertyPosDO propertyPos = propertyPosService.getPropertyPos(id);
|
||||
return success(BeanUtils.toBean(propertyPos, PropertyPosRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得企业管理-资产存放位置分页")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-pos:query')")
|
||||
public CommonResult<IPage<PropertyPosRespVO>> getPropertyPosPage(PropertyPosReqVO pageReqVO) {
|
||||
IPage<PropertyPosRespVO> pageResult = propertyPosService.getPropertyPosPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出企业管理-资产存放位置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('company:property-pos:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPropertyPosExcel(PropertyPosReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PropertyPosRespVO> list = propertyPosService.getPropertyPosPage(pageReqVO).getRecords();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "企业管理-资产存放位置.xls", "数据", PropertyPosRespVO.class,list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
package cn.iocoder.yudao.module.custom.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 企业管理-资产 DO
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@TableName("company_property")
|
||||
@KeySequence("company_property_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Property extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 企业id
|
||||
*/
|
||||
private String corpId;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 存放位置
|
||||
*/
|
||||
private String posId;
|
||||
/**
|
||||
* 使用人id
|
||||
*/
|
||||
private String userId;
|
||||
/**
|
||||
* 资产编号
|
||||
*/
|
||||
private String propNo;
|
||||
/**
|
||||
* 资产名称
|
||||
*/
|
||||
private String propName;
|
||||
/**
|
||||
* 资产分类
|
||||
*/
|
||||
private String propCatg;
|
||||
/**
|
||||
* 预计使用年限
|
||||
*/
|
||||
private Integer useYear;
|
||||
/**
|
||||
* 价值类型
|
||||
*
|
||||
* 枚举 {@link TODO company_cost_type 对应的类}
|
||||
*/
|
||||
private String costType;
|
||||
/**
|
||||
* 资产数量
|
||||
*/
|
||||
private Integer propNum;
|
||||
/**
|
||||
* 资产原值(元)
|
||||
*/
|
||||
private BigDecimal costTotal;
|
||||
/**
|
||||
* 资产状态
|
||||
*
|
||||
* 枚举 {@link TODO company_prop_status 对应的类}
|
||||
*/
|
||||
private String propStatus;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 生产厂家
|
||||
*/
|
||||
private String factory;
|
||||
/**
|
||||
* 出场序列号/编号
|
||||
*/
|
||||
private String serialNo;
|
||||
/**
|
||||
* 数量计量单位
|
||||
*/
|
||||
private String unit;
|
||||
/**
|
||||
* 取得日期
|
||||
*/
|
||||
private LocalDate getDate;
|
||||
/**
|
||||
* 出厂日期
|
||||
*/
|
||||
private LocalDate prodDate;
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private String supplier;
|
||||
/**
|
||||
* 启用日期
|
||||
*/
|
||||
private LocalDate openDate;
|
||||
/**
|
||||
* 净值(元)
|
||||
*/
|
||||
private BigDecimal netValue;
|
||||
/**
|
||||
* 凭证号
|
||||
*/
|
||||
private String voucherNo;
|
||||
/**
|
||||
* 维修/保养周期单位
|
||||
*/
|
||||
private String keepCycleType;
|
||||
/**
|
||||
* 维修/保养周期
|
||||
*/
|
||||
private Integer keepCycle;
|
||||
/**
|
||||
* 上次维修/保养日期
|
||||
*/
|
||||
private LocalDate lastKeepDate;
|
||||
/**
|
||||
* 下次维修/保养日期
|
||||
*/
|
||||
private LocalDate nextKeepDate;
|
||||
/**
|
||||
* 附件urls
|
||||
*/
|
||||
private String fileUrls;
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.custom.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 企业管理-资产处置单/变动单 DO
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@TableName("company_property_deal")
|
||||
@KeySequence("company_property_deal_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PropertyDealDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 企业id(base_company表中的id)
|
||||
*/
|
||||
private String corpId;
|
||||
/**
|
||||
* 部门id(system_dept表中的id,用来做数据权限控制)
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 数据类型
|
||||
*
|
||||
* 枚举 {@link TODO property_data_type 对应的类}
|
||||
*/
|
||||
private String dataType;
|
||||
/**
|
||||
* 处置/变动单号
|
||||
*/
|
||||
private String dealNo;
|
||||
/**
|
||||
* 处置/变动日期
|
||||
*/
|
||||
private LocalDate dealDate;
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package cn.iocoder.yudao.module.custom.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 企业管理-资产处置子 DO
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@TableName("company_property_deal_item")
|
||||
@KeySequence("company_property_deal_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PropertyDealItemDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 处置单/变动单id
|
||||
*/
|
||||
private String dealId;
|
||||
/**
|
||||
* 资产id
|
||||
*/
|
||||
private String propertyId;
|
||||
/**
|
||||
* 处置方式
|
||||
*
|
||||
* 枚举 {@link TODO company_deal_way 对应的类}
|
||||
*/
|
||||
private String dealWay;
|
||||
/**
|
||||
* 原企业id
|
||||
*/
|
||||
private String oldCorpId;
|
||||
/**
|
||||
* 调入企业id
|
||||
*/
|
||||
private String corpId;
|
||||
/**
|
||||
* 原部门id
|
||||
*/
|
||||
private Long oldDeptId;
|
||||
/**
|
||||
* 调入部门id
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 原存放地id
|
||||
*/
|
||||
private String oldPosId;
|
||||
/**
|
||||
* 调入存放地id
|
||||
*/
|
||||
private String posId;
|
||||
/**
|
||||
* 原使用人id
|
||||
*/
|
||||
private Long oldUserId;
|
||||
/**
|
||||
* 调入使用人id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package cn.iocoder.yudao.module.custom.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 资产维修/保养记录 DO
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@TableName("company_property_keep")
|
||||
@KeySequence("company_property_keep_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PropertyKeep extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 资产id
|
||||
*/
|
||||
private String propertyId;
|
||||
/**
|
||||
* 维修/保养日期
|
||||
*/
|
||||
private LocalDate keepDate;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 附件urls
|
||||
*/
|
||||
private String fileUrls;
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.custom.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 企业管理-资产存放位置 DO
|
||||
*
|
||||
* @author vinjor-m
|
||||
*/
|
||||
@TableName("company_property_pos")
|
||||
@KeySequence("company_property_pos_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PropertyPosDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 企业id(base_company表中的id)
|
||||
*/
|
||||
private String corpId;
|
||||
/**
|
||||
* 部门id(system_dept表中的id,用来做数据权限控制)
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 存放地名称
|
||||
*/
|
||||
private String posName;
|
||||
/**
|
||||
* 存放地地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 面积
|
||||
*/
|
||||
private BigDecimal area;
|
||||
/**
|
||||
* 存放类型
|
||||
*
|
||||
* 枚举 {@link TODO company_deposit_type 对应的类}
|
||||
*/
|
||||
private String depositType;
|
||||
|
||||
}
|
@ -3,15 +3,15 @@ package cn.iocoder.yudao.module.custom.mapper;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.custom.entity.CarBrand;
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarBrandReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarBrandRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarMainRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.*;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆品牌维护 Mapper
|
||||
*
|
||||
@ -22,4 +22,6 @@ public interface CarBrandMapper extends BaseMapper<CarBrand> {
|
||||
|
||||
IPage<CarBrandRespVO> findPage(Page<CarBrandReqVO> page,@Param("dto") CarBrandReqVO reqVO);
|
||||
|
||||
List<CascaderOptionsVO> searchBrand(@Param("dto") CarBrandReqVO reqVO);
|
||||
|
||||
}
|
@ -29,6 +29,14 @@ public interface CarMainMapper extends BaseMapper<CarMain> {
|
||||
*/
|
||||
IPage<CarMainRespVO> findPage(Page<CarMainReqVO> page, @Param("dto") CarMainReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得车辆信息分页
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
CarMainRespVO findOne(@Param("id") String id);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -3,16 +3,15 @@ package cn.iocoder.yudao.module.custom.mapper;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
import cn.iocoder.yudao.module.custom.entity.CarModel;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarMainReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarMainRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarModelReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarModelRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.*;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆品牌型号 Mapper
|
||||
*
|
||||
@ -25,5 +24,11 @@ public interface CarModelMapper extends BaseMapper<CarModel> {
|
||||
|
||||
IPage<CarModelRespVO> getCarModelPageByBrandId(Page<CarModelReqVO> page, @Param("dto") CarModelReqVO reqVO);
|
||||
|
||||
List<CascaderOptionsVO> searchModelByBrandid(@Param("dto") CarModelReqVO reqVO);
|
||||
|
||||
// List<CarModelRespVO> searchModel(@Param("dto") CarModelReqVO reqVO);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.custom.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyDealItemDO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealItemReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealItemRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 企业管理-资产处置子 Mapper
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface PropertyDealItemMapper extends BaseMapper<PropertyDealItemDO> {
|
||||
|
||||
default IPage<PropertyDealItemRespVO> selectPage(PropertyDealItemReqVO reqVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.custom.mapper;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyDealDO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 企业管理-资产处置单/变动单 Mapper
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface PropertyDealMapper extends BaseMapperX<PropertyDealDO> {
|
||||
|
||||
default IPage<PropertyDealRespVO> selectPage(PropertyDealReqVO reqVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.custom.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyKeep;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyKeepReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyKeepRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 资产维修/保养记录 Mapper
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface PropertyKeepMapper extends BaseMapper<PropertyKeep> {
|
||||
|
||||
default IPage<PropertyKeepRespVO> selectPage(PropertyKeepReqVO reqVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.custom.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.Property;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 企业管理-资产 Mapper
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface PropertyMapper extends BaseMapper<Property> {
|
||||
|
||||
default IPage<PropertyRespVO> selectPage(PropertyReqVO reqVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.custom.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyPosDO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyPosReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyPosRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 企业管理-资产存放位置 Mapper
|
||||
*
|
||||
* @author vinjor-m
|
||||
*/
|
||||
@Mapper
|
||||
public interface PropertyPosMapper extends BaseMapper<PropertyPosDO> {
|
||||
|
||||
default IPage<PropertyPosRespVO> selectPage(PropertyPosReqVO reqVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -65,5 +65,5 @@ public interface CarMainService extends IService<CarMain> {
|
||||
* @param saveReqVO CustomerMainSaveReqVO实体
|
||||
* @return void
|
||||
**/
|
||||
void bindCustomAndCar(CustomerMainSaveReqVO saveReqVO);
|
||||
void bindCustomAndCar(CarMainReqVO saveReqVO);
|
||||
}
|
@ -6,8 +6,12 @@ import cn.iocoder.yudao.module.custom.entity.CarModel;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarModelReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarModelReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarModelRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CascaderOptionsVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆品牌型号 Service 接口
|
||||
@ -62,4 +66,12 @@ public interface CarModelService extends IService<CarModel> {
|
||||
*/
|
||||
IPage<CarModelRespVO> getCarModelPageByBrandId(CarModelReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获取品牌型号级联下拉
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<CascaderOptionsVO> searchBrand(CarModelReqVO reqVO);
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.custom.service;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyDealItemDO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealItemReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealItemRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
||||
/**
|
||||
* 企业管理-资产处置子 Service 接口
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
public interface PropertyDealItemService extends IService<PropertyDealItemDO> {
|
||||
|
||||
/**
|
||||
* 创建企业管理-资产处置子
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createPropertyDealItem(PropertyDealItemReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新企业管理-资产处置子
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePropertyDealItem(PropertyDealItemReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除企业管理-资产处置子
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePropertyDealItem(String id);
|
||||
|
||||
/**
|
||||
* 获得企业管理-资产处置子
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 企业管理-资产处置子
|
||||
*/
|
||||
PropertyDealItemDO getPropertyDealItem(String id);
|
||||
|
||||
/**
|
||||
* 获得企业管理-资产处置子分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 企业管理-资产处置子分页
|
||||
*/
|
||||
IPage<PropertyDealItemRespVO> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.custom.service;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyDealDO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 企业管理-资产处置单/变动单 Service 接口
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
public interface PropertyDealService extends IService<PropertyDealDO> {
|
||||
|
||||
/**
|
||||
* 创建企业管理-资产处置单/变动单
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createPropertyDeal(PropertyDealReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新企业管理-资产处置单/变动单
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePropertyDeal(PropertyDealReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除企业管理-资产处置单/变动单
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePropertyDeal(String id);
|
||||
|
||||
/**
|
||||
* 获得企业管理-资产处置单/变动单
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 企业管理-资产处置单/变动单
|
||||
*/
|
||||
PropertyDealDO getPropertyDeal(String id);
|
||||
|
||||
/**
|
||||
* 获得企业管理-资产处置单/变动单分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 企业管理-资产处置单/变动单分页
|
||||
*/
|
||||
IPage<PropertyDealRespVO> getPropertyDealPage(PropertyDealReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.custom.service;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyKeep;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyKeepReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyKeepRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 资产维修/保养记录 Service 接口
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
public interface PropertyKeepService extends IService<PropertyKeep> {
|
||||
|
||||
/**
|
||||
* 创建资产维修/保养记录
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createPropertyKeep(PropertyKeepReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新资产维修/保养记录
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePropertyKeep(PropertyKeepReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除资产维修/保养记录
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePropertyKeep(String id);
|
||||
|
||||
/**
|
||||
* 获得资产维修/保养记录
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 资产维修/保养记录
|
||||
*/
|
||||
PropertyKeep getPropertyKeep(String id);
|
||||
|
||||
/**
|
||||
* 获得资产维修/保养记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 资产维修/保养记录分页
|
||||
*/
|
||||
IPage<PropertyKeepRespVO> getPropertyKeepPage(PropertyKeepReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.custom.service;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyPosDO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyPosReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyPosRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 企业管理-资产存放位置 Service 接口
|
||||
*
|
||||
* @author vinjor-m
|
||||
*/
|
||||
public interface PropertyPosService extends IService<PropertyPosDO> {
|
||||
|
||||
/**
|
||||
* 创建企业管理-资产存放位置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createPropertyPos(PropertyPosReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新企业管理-资产存放位置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePropertyPos(PropertyPosReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除企业管理-资产存放位置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePropertyPos(String id);
|
||||
|
||||
/**
|
||||
* 获得企业管理-资产存放位置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 企业管理-资产存放位置
|
||||
*/
|
||||
PropertyPosDO getPropertyPos(String id);
|
||||
|
||||
/**
|
||||
* 获得企业管理-资产存放位置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 企业管理-资产存放位置分页
|
||||
*/
|
||||
IPage<PropertyPosRespVO> getPropertyPosPage(PropertyPosReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.custom.service;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.Property;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 企业管理-资产 Service 接口
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
public interface PropertyService extends IService<Property> {
|
||||
|
||||
/**
|
||||
* 创建企业管理-资产
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createProperty(PropertyReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新企业管理-资产
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateProperty(PropertyReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除企业管理-资产
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteProperty(String id);
|
||||
|
||||
/**
|
||||
* 获得企业管理-资产
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 企业管理-资产
|
||||
*/
|
||||
Property getProperty(String id);
|
||||
|
||||
/**
|
||||
* 获得企业管理-资产分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 企业管理-资产分页
|
||||
*/
|
||||
IPage<PropertyRespVO> getPropertyPage(PropertyReqVO pageReqVO);
|
||||
|
||||
}
|
@ -9,9 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import java.util.UUID;
|
||||
@ -25,6 +23,12 @@ import java.util.UUID;
|
||||
@Validated
|
||||
public class CarBrandServiceImpl extends ServiceImpl<CarBrandMapper, CarBrand> implements CarBrandService {
|
||||
|
||||
/**
|
||||
* 创建车辆品牌维护
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
@Override
|
||||
public String createCarBrand(CarBrandReqVO createReqVO) {
|
||||
// 插入
|
||||
@ -35,6 +39,11 @@ public class CarBrandServiceImpl extends ServiceImpl<CarBrandMapper, CarBrand> i
|
||||
return carBrand.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新车辆品牌维护
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
@Override
|
||||
public void updateCarBrand(CarBrandReqVO updateReqVO) {
|
||||
|
||||
@ -43,19 +52,34 @@ public class CarBrandServiceImpl extends ServiceImpl<CarBrandMapper, CarBrand> i
|
||||
baseMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆品牌维护
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
@Override
|
||||
public void deleteCarBrand(String id) {
|
||||
|
||||
// 删除
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获得车辆品牌维护
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 车辆品牌维护
|
||||
*/
|
||||
@Override
|
||||
public CarBrand getCarBrand(String id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得车辆品牌维护分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 车辆品牌维护分页
|
||||
*/
|
||||
@Override
|
||||
public IPage<CarBrandRespVO> getCarBrandPage(CarBrandReqVO pageReqVO) {
|
||||
Page<CarBrandReqVO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
|
@ -1,14 +1,10 @@
|
||||
package cn.iocoder.yudao.module.custom.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerCar;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerItem;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||
import cn.iocoder.yudao.module.custom.mapper.CarMainMapper;
|
||||
import cn.iocoder.yudao.module.custom.mapper.CustomerCarMapper;
|
||||
import cn.iocoder.yudao.module.custom.service.CarMainService;
|
||||
@ -16,21 +12,18 @@ import cn.iocoder.yudao.module.custom.service.CustomerCarService;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarMainReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CarMainRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import cn.iocoder.yudao.module.label.entity.BusiLabel;
|
||||
import cn.iocoder.yudao.module.label.service.BusiLabelService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.common.BaseConstants.CUS_SIGN_CAR;
|
||||
import static cn.iocoder.yudao.common.BaseConstants.CUS_SIGN_CUSTOMER;
|
||||
|
||||
/**
|
||||
* 车辆信息 Service 实现类
|
||||
@ -46,6 +39,10 @@ public class CarMainServiceImpl extends ServiceImpl<CarMainMapper, CarMain> impl
|
||||
@Autowired
|
||||
private CustomerCarService customerCarService;
|
||||
|
||||
@Autowired
|
||||
private BusiLabelService busiLabelService;
|
||||
|
||||
|
||||
/**
|
||||
* 创建车辆信息
|
||||
*
|
||||
@ -65,8 +62,19 @@ public class CarMainServiceImpl extends ServiceImpl<CarMainMapper, CarMain> impl
|
||||
|
||||
}
|
||||
}
|
||||
//车俩品牌型号级联选择器返回值,第一位是品牌,第二位是型号
|
||||
List<String> brandAndModel = createReqVO.getBrandAndModel();
|
||||
// 插入
|
||||
CarMain carMain = BeanUtils.toBean(createReqVO, CarMain.class);
|
||||
carMain.setCarBrand(brandAndModel.get(0));
|
||||
//判断是否仅填入了品牌
|
||||
if(brandAndModel.size()>1){
|
||||
//填入了型号
|
||||
carMain.setCarModel(brandAndModel.get(1));
|
||||
}else {
|
||||
carMain.setCarModel("");
|
||||
}
|
||||
//todo 计算下次保养时间,下次保养里程,下次年检时间,保险到期时间
|
||||
baseMapper.insert(carMain);
|
||||
// 返回
|
||||
return CommonResult.success("新增成功");
|
||||
@ -90,9 +98,20 @@ public class CarMainServiceImpl extends ServiceImpl<CarMainMapper, CarMain> impl
|
||||
|
||||
}
|
||||
}
|
||||
// 更新
|
||||
CarMain updateObj = BeanUtils.toBean(updateReqVO, CarMain.class);
|
||||
baseMapper.updateById(updateObj);
|
||||
//车俩品牌型号级联选择器返回值,第一位是品牌,第二位是型号
|
||||
List<String> brandAndModel = updateReqVO.getBrandAndModel();
|
||||
// 插入
|
||||
CarMain carMain = BeanUtils.toBean(updateReqVO, CarMain.class);
|
||||
carMain.setCarBrand(brandAndModel.get(0));
|
||||
//判断是否仅填入了品牌
|
||||
if(brandAndModel.size()>1){
|
||||
//填入了型号
|
||||
carMain.setCarModel(brandAndModel.get(1));
|
||||
}else {
|
||||
carMain.setCarModel("");
|
||||
}
|
||||
//todo 计算下次保养时间,下次保养里程,下次年检时间,保险到期时间
|
||||
baseMapper.updateById(carMain);
|
||||
return CommonResult.success("修改成功");
|
||||
}
|
||||
|
||||
@ -121,14 +140,22 @@ public class CarMainServiceImpl extends ServiceImpl<CarMainMapper, CarMain> impl
|
||||
@Override
|
||||
public CarMainRespVO getCarMain(String id) {
|
||||
//数据单查
|
||||
CarMain carMain = baseMapper.selectById(id);
|
||||
CarMainRespVO result = BeanUtils.toBean(carMain, CarMainRespVO.class);
|
||||
CarMainRespVO carMainRespVO = baseMapper.findOne(id);
|
||||
|
||||
List<String> brandAndModel = new ArrayList<>();
|
||||
brandAndModel.add(carMainRespVO.getCarBrand());
|
||||
brandAndModel.add(carMainRespVO.getCarModel());
|
||||
|
||||
carMainRespVO.setBrandAndModel(brandAndModel);
|
||||
//联查客户信息
|
||||
List<CustomerMainRespVO> cusList = customerCarMapper.selectCusListByCarId(id);
|
||||
result.setCusList(cusList);
|
||||
carMainRespVO.setCusList(cusList);
|
||||
|
||||
return result;
|
||||
//联查标签信息
|
||||
List<BusiLabel> labelList = busiLabelService.listByMainId(id);
|
||||
carMainRespVO.setLabelList(labelList);
|
||||
|
||||
return carMainRespVO;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -152,7 +179,7 @@ public class CarMainServiceImpl extends ServiceImpl<CarMainMapper, CarMain> impl
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void bindCustomAndCar(CustomerMainSaveReqVO saveReqVO) {
|
||||
public void bindCustomAndCar(CarMainReqVO saveReqVO) {
|
||||
List<CustomerCar> customerCars = new ArrayList<>();
|
||||
List<CustomerMainRespVO> cusList = saveReqVO.getCusList();
|
||||
if (ObjectUtil.isNotEmpty(cusList)){
|
||||
|
@ -1,7 +1,8 @@
|
||||
package cn.iocoder.yudao.module.custom.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.CarModel;
|
||||
import cn.iocoder.yudao.module.custom.mapper.CarBrandMapper;
|
||||
import cn.iocoder.yudao.module.custom.mapper.CarModelMapper;
|
||||
import cn.iocoder.yudao.module.custom.service.CarModelService;
|
||||
import cn.iocoder.yudao.module.custom.vo.*;
|
||||
@ -9,13 +10,13 @@ import cn.iocoder.yudao.module.custom.vo.CarModelReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@ -27,6 +28,15 @@ import java.util.UUID;
|
||||
@Validated
|
||||
public class CarModelServiceImpl extends ServiceImpl<CarModelMapper, CarModel> implements CarModelService {
|
||||
|
||||
@Autowired
|
||||
CarBrandMapper carBrandMapper;
|
||||
|
||||
/**
|
||||
* 创建车辆品牌型号
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
@Override
|
||||
public String createCarModel(CarModelReqVO createReqVO) {
|
||||
// 插入
|
||||
@ -37,6 +47,11 @@ public class CarModelServiceImpl extends ServiceImpl<CarModelMapper, CarModel> i
|
||||
return carModel.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新车辆品牌型号
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
@Override
|
||||
public void updateCarModel(CarModelReqVO updateReqVO) {
|
||||
// 更新
|
||||
@ -44,26 +59,47 @@ public class CarModelServiceImpl extends ServiceImpl<CarModelMapper, CarModel> i
|
||||
baseMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆品牌型号
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
@Override
|
||||
public void deleteCarModel(String id) {
|
||||
|
||||
// 删除
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获得车辆品牌型号
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 车辆品牌型号
|
||||
*/
|
||||
@Override
|
||||
public CarModel getCarModel(String id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得车辆品牌型号分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 车辆品牌型号分页
|
||||
*/
|
||||
@Override
|
||||
public IPage<CarModelRespVO> getCarModelPage(CarModelReqVO pageReqVO) {
|
||||
//取分页参数
|
||||
Page<CarModelReqVO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
return baseMapper.findPage(page,pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得车辆品牌型号分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 车辆品牌型号分页
|
||||
*/
|
||||
@Override
|
||||
public IPage<CarModelRespVO> getCarModelPageByBrandId(CarModelReqVO pageReqVO) {
|
||||
//取分页参数
|
||||
@ -71,4 +107,41 @@ public class CarModelServiceImpl extends ServiceImpl<CarModelMapper, CarModel> i
|
||||
return baseMapper.findPage(page,pageReqVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取品牌型号级联下拉
|
||||
*
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CascaderOptionsVO> searchBrand(CarModelReqVO reqVO) {
|
||||
|
||||
CarBrandReqVO brandQuery = new CarBrandReqVO();
|
||||
brandQuery.setBrandName(reqVO.getModelName());
|
||||
List<CascaderOptionsVO> nameResult = carBrandMapper.searchBrand(brandQuery);
|
||||
|
||||
return getChildModel(nameResult,reqVO.getModelName());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父级品牌集合取所有的型号子选项
|
||||
*
|
||||
* @param brands
|
||||
* @return
|
||||
*/
|
||||
private List<CascaderOptionsVO> getChildModel(List<CascaderOptionsVO> brands,String name){
|
||||
//遍历父级数据
|
||||
for (CascaderOptionsVO brandItem: brands) {
|
||||
CarModelReqVO query = new CarModelReqVO();
|
||||
query.setBrandId(brandItem.getValue());
|
||||
query.setModelName(name);
|
||||
//取品牌下属型号选项
|
||||
List<CascaderOptionsVO> models = baseMapper.searchModelByBrandid(query);
|
||||
//父级数据拼装
|
||||
brandItem.setChildren(models);
|
||||
|
||||
}
|
||||
return brands;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.custom.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyDealItemDO;
|
||||
import cn.iocoder.yudao.module.custom.mapper.PropertyDealItemMapper;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyDealItemService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealItemReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealItemRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 企业管理-资产处置子 Service 实现类
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PropertyDealItemServiceImpl extends ServiceImpl<PropertyDealItemMapper, PropertyDealItemDO> implements PropertyDealItemService {
|
||||
|
||||
@Override
|
||||
public String createPropertyDealItem(PropertyDealItemReqVO createReqVO) {
|
||||
// 插入
|
||||
PropertyDealItemDO propertyDealItem = BeanUtils.toBean(createReqVO, PropertyDealItemDO.class);
|
||||
baseMapper.insert(propertyDealItem);
|
||||
// 返回
|
||||
return propertyDealItem.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePropertyDealItem(PropertyDealItemReqVO updateReqVO) {
|
||||
// 更新
|
||||
PropertyDealItemDO updateObj = BeanUtils.toBean(updateReqVO, PropertyDealItemDO.class);
|
||||
baseMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePropertyDealItem(String id) {
|
||||
// 删除
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PropertyDealItemDO getPropertyDealItem(String id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PropertyDealItemRespVO> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO) {
|
||||
return baseMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.custom.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyDealDO;
|
||||
import cn.iocoder.yudao.module.custom.mapper.PropertyDealMapper;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyDealService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyDealRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
|
||||
/**
|
||||
* 企业管理-资产处置单/变动单 Service 实现类
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PropertyDealServiceImpl extends ServiceImpl<PropertyDealMapper,PropertyDealDO> implements PropertyDealService {
|
||||
|
||||
@Override
|
||||
public String createPropertyDeal(PropertyDealReqVO createReqVO) {
|
||||
// 插入
|
||||
PropertyDealDO propertyDeal = BeanUtils.toBean(createReqVO, PropertyDealDO.class);
|
||||
baseMapper.insert(propertyDeal);
|
||||
// 返回
|
||||
return propertyDeal.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePropertyDeal(PropertyDealReqVO updateReqVO) {
|
||||
// 更新
|
||||
PropertyDealDO updateObj = BeanUtils.toBean(updateReqVO, PropertyDealDO.class);
|
||||
baseMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePropertyDeal(String id) {
|
||||
// 删除
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PropertyDealDO getPropertyDeal(String id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PropertyDealRespVO> getPropertyDealPage(PropertyDealReqVO pageReqVO) {
|
||||
return baseMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.custom.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyKeep;
|
||||
import cn.iocoder.yudao.module.custom.mapper.PropertyKeepMapper;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyKeepService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyKeepReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyKeepRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 资产维修/保养记录 Service 实现类
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PropertyKeepServiceImpl extends ServiceImpl<PropertyKeepMapper, PropertyKeep> implements PropertyKeepService {
|
||||
|
||||
@Override
|
||||
public String createPropertyKeep(PropertyKeepReqVO createReqVO) {
|
||||
// 插入
|
||||
PropertyKeep propertyKeep = BeanUtils.toBean(createReqVO, PropertyKeep.class);
|
||||
baseMapper.insert(propertyKeep);
|
||||
// 返回
|
||||
return propertyKeep.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePropertyKeep(PropertyKeepReqVO updateReqVO) {
|
||||
// 更新
|
||||
PropertyKeep updateObj = BeanUtils.toBean(updateReqVO, PropertyKeep.class);
|
||||
baseMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePropertyKeep(String id) {
|
||||
// 删除
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PropertyKeep getPropertyKeep(String id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PropertyKeepRespVO> getPropertyKeepPage(PropertyKeepReqVO pageReqVO) {
|
||||
return baseMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.custom.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.PropertyPosDO;
|
||||
import cn.iocoder.yudao.module.custom.mapper.PropertyPosMapper;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyPosService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyPosReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyPosRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 企业管理-资产存放位置 Service 实现类
|
||||
*
|
||||
* @author vinjor-m
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PropertyPosServiceImpl extends ServiceImpl<PropertyPosMapper, PropertyPosDO> implements PropertyPosService {
|
||||
|
||||
@Override
|
||||
public String createPropertyPos(PropertyPosReqVO createReqVO) {
|
||||
// 插入
|
||||
PropertyPosDO propertyPos = BeanUtils.toBean(createReqVO, PropertyPosDO.class);
|
||||
baseMapper.insert(propertyPos);
|
||||
// 返回
|
||||
return propertyPos.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePropertyPos(PropertyPosReqVO updateReqVO) {
|
||||
// 更新
|
||||
PropertyPosDO updateObj = BeanUtils.toBean(updateReqVO, PropertyPosDO.class);
|
||||
baseMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePropertyPos(String id) {
|
||||
// 删除
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public PropertyPosDO getPropertyPos(String id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PropertyPosRespVO> getPropertyPosPage(PropertyPosReqVO pageReqVO) {
|
||||
return baseMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.custom.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.Property;
|
||||
import cn.iocoder.yudao.module.custom.mapper.PropertyMapper;
|
||||
import cn.iocoder.yudao.module.custom.service.PropertyService;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyReqVO;
|
||||
import cn.iocoder.yudao.module.custom.vo.PropertyRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* 企业管理-资产 Service 实现类
|
||||
*
|
||||
* @author 后台管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PropertyServiceImpl extends ServiceImpl<PropertyMapper, Property> implements PropertyService {
|
||||
|
||||
@Override
|
||||
public String createProperty(PropertyReqVO createReqVO) {
|
||||
// 插入
|
||||
Property property = BeanUtils.toBean(createReqVO, Property.class);
|
||||
baseMapper.insert(property);
|
||||
// 返回
|
||||
return property.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProperty(PropertyReqVO updateReqVO) {
|
||||
// 更新
|
||||
Property updateObj = BeanUtils.toBean(updateReqVO, Property.class);
|
||||
baseMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProperty(String id) {
|
||||
// 删除
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Property getProperty(String id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PropertyRespVO> getPropertyPage(PropertyReqVO pageReqVO) {
|
||||
return baseMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.label.entity.BusiLabel;
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
@ -78,4 +80,11 @@ public class CarMainReqVO extends PageParam {
|
||||
@Schema(description = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
@Schema(description = "车辆绑定客户信息")
|
||||
private List<CustomerMainRespVO> cusList;
|
||||
|
||||
@Schema(description = "车辆绑定标签信息")
|
||||
List<BusiLabel> labelList;
|
||||
/**车辆品牌型号数组*/
|
||||
List<String> brandAndModel;
|
||||
}
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||
import cn.iocoder.yudao.module.label.entity.BusiLabel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -25,9 +26,19 @@ public class CarMainRespVO extends CarMain {
|
||||
@Schema(description = "是否车主(0否1是)")
|
||||
private String isOwner;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@Schema(description = "关联客户信息")
|
||||
private List<CustomerMainRespVO> cusList;
|
||||
|
||||
@Schema(description = "标签信息")
|
||||
List<BusiLabel> labelList;
|
||||
/**品牌字符*/
|
||||
String brandStr;
|
||||
/**型号字符*/
|
||||
String modelStr;
|
||||
|
||||
|
||||
/**车辆品牌型号数组*/
|
||||
List<String> brandAndModel;
|
||||
|
||||
|
||||
|
||||
|
@ -44,4 +44,5 @@ public class CarModelReqVO extends PageParam {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -17,4 +17,9 @@ public class CarModelRespVO extends CarModel {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
// /**
|
||||
// * 车辆品牌型号选项
|
||||
// */
|
||||
// List<CascaderOptionsVO> modelOptions;
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Schema(description = "级联选择器选项")
|
||||
public class CascaderOptionsVO {
|
||||
/**
|
||||
* 选项值
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 选项名
|
||||
*/
|
||||
private String label;
|
||||
/**
|
||||
* 选项子项
|
||||
*/
|
||||
List<CascaderOptionsVO> children;
|
||||
/**
|
||||
* 懒加载:是否为叶子节点 0父 1子
|
||||
*/
|
||||
int leaf;
|
||||
|
||||
}
|
@ -26,6 +26,8 @@ public class CustomerMainRespVO extends CustomerMain {
|
||||
List<CustomerMain> attnList;
|
||||
/**标签信息*/
|
||||
List<BusiLabel> labelList;
|
||||
/**车辆品牌型号数组*/
|
||||
List<String> brandAndModel;
|
||||
|
||||
/**是否车主(0否1是)*/
|
||||
private String isOwner;
|
||||
|
@ -16,8 +16,6 @@ public class CustomerMainSaveReqVO extends CustomerMain {
|
||||
private List<CustomerItem> itemList;
|
||||
/**客户绑定车辆信息*/
|
||||
private List<CarMainRespVO> carList;
|
||||
/**客户绑定车辆信息*/
|
||||
private List<CustomerMainRespVO> cusList;
|
||||
/**标签信息*/
|
||||
List<BusiLabel> labelList;
|
||||
|
||||
|
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 企业管理-资产处置子分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PropertyDealItemReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "18095")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "处置单/变动单id", example = "12936")
|
||||
private String dealId;
|
||||
|
||||
@Schema(description = "资产id", example = "14421")
|
||||
private String propertyId;
|
||||
|
||||
@Schema(description = "处置方式")
|
||||
private String dealWay;
|
||||
|
||||
@Schema(description = "原企业id", example = "17291")
|
||||
private String oldCorpId;
|
||||
|
||||
@Schema(description = "调入企业id", example = "21009")
|
||||
private String corpId;
|
||||
|
||||
@Schema(description = "原部门id", example = "23846")
|
||||
private Long oldDeptId;
|
||||
|
||||
@Schema(description = "调入部门id", example = "3881")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "原存放地id", example = "8837")
|
||||
private String oldPosId;
|
||||
|
||||
@Schema(description = "调入存放地id", example = "28147")
|
||||
private String posId;
|
||||
|
||||
@Schema(description = "原使用人id", example = "23983")
|
||||
private Long oldUserId;
|
||||
|
||||
@Schema(description = "调入使用人id", example = "918")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 企业管理-资产处置子 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PropertyDealItemRespVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "18095")
|
||||
@ExcelProperty("主键标识")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "处置单/变动单id", example = "12936")
|
||||
@ExcelProperty("处置单/变动单id")
|
||||
private String dealId;
|
||||
|
||||
@Schema(description = "资产id", example = "14421")
|
||||
@ExcelProperty("资产id")
|
||||
private String propertyId;
|
||||
|
||||
@Schema(description = "处置方式")
|
||||
@ExcelProperty(value = "处置方式", converter = DictConvert.class)
|
||||
@DictFormat("company_deal_way") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String dealWay;
|
||||
|
||||
@Schema(description = "原企业id", example = "17291")
|
||||
@ExcelProperty("原企业id")
|
||||
private String oldCorpId;
|
||||
|
||||
@Schema(description = "调入企业id", example = "21009")
|
||||
@ExcelProperty("调入企业id")
|
||||
private String corpId;
|
||||
|
||||
@Schema(description = "原部门id", example = "23846")
|
||||
@ExcelProperty("原部门id")
|
||||
private Long oldDeptId;
|
||||
|
||||
@Schema(description = "调入部门id", example = "3881")
|
||||
@ExcelProperty("调入部门id")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "原存放地id", example = "8837")
|
||||
@ExcelProperty("原存放地id")
|
||||
private String oldPosId;
|
||||
|
||||
@Schema(description = "调入存放地id", example = "28147")
|
||||
@ExcelProperty("调入存放地id")
|
||||
private String posId;
|
||||
|
||||
@Schema(description = "原使用人id", example = "23983")
|
||||
@ExcelProperty("原使用人id")
|
||||
private Long oldUserId;
|
||||
|
||||
@Schema(description = "调入使用人id", example = "918")
|
||||
@ExcelProperty("调入使用人id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 企业管理-资产处置单/变动单分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PropertyDealReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "18095")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "企业id(base_company表中的id)", example = "21595")
|
||||
private String corpId;
|
||||
|
||||
@Schema(description = "部门id(system_dept表中的id,用来做数据权限控制)", example = "19510")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "数据类型", example = "1")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "处置/变动单号")
|
||||
private String dealNo;
|
||||
|
||||
@Schema(description = "处置/变动日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDate[] dealDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 企业管理-资产处置单/变动单 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PropertyDealRespVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "29577")
|
||||
@ExcelProperty("主键标识")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "企业id(base_company表中的id)", example = "21595")
|
||||
@ExcelProperty("企业id(base_company表中的id)")
|
||||
private String corpId;
|
||||
|
||||
@Schema(description = "部门id(system_dept表中的id,用来做数据权限控制)", example = "19510")
|
||||
@ExcelProperty("部门id(system_dept表中的id,用来做数据权限控制)")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "数据类型", example = "1")
|
||||
@ExcelProperty(value = "数据类型", converter = DictConvert.class)
|
||||
@DictFormat("property_data_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "处置/变动单号")
|
||||
@ExcelProperty("处置/变动单号")
|
||||
private String dealNo;
|
||||
|
||||
@Schema(description = "处置/变动日期")
|
||||
@ExcelProperty("处置/变动日期")
|
||||
private LocalDate dealDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 资产维修/保养记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PropertyKeepReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "22729")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "资产id", example = "20917")
|
||||
private String propertyId;
|
||||
|
||||
@Schema(description = "维修/保养日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate keepDate;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "附件urls")
|
||||
private String fileUrls;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.Property;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 资产维修/保养记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PropertyKeepRespVO extends Property {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 企业管理-资产存放位置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PropertyPosReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "18095")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "企业id(base_company表中的id)", example = "5018")
|
||||
private String corpId;
|
||||
|
||||
@Schema(description = "部门id(system_dept表中的id,用来做数据权限控制)", example = "25943")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "存放地名称", example = "王五")
|
||||
private String posName;
|
||||
|
||||
@Schema(description = "存放地地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@Schema(description = "存放类型", example = "2")
|
||||
private String depositType;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 企业管理-资产存放位置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PropertyPosRespVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "19336")
|
||||
@ExcelProperty("主键标识")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "企业id(base_company表中的id)", example = "5018")
|
||||
@ExcelProperty("企业id(base_company表中的id)")
|
||||
private String corpId;
|
||||
|
||||
@Schema(description = "部门id(system_dept表中的id,用来做数据权限控制)", example = "25943")
|
||||
@ExcelProperty("部门id(system_dept表中的id,用来做数据权限控制)")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "存放地名称", example = "王五")
|
||||
@ExcelProperty("存放地名称")
|
||||
private String posName;
|
||||
|
||||
@Schema(description = "存放地地址")
|
||||
@ExcelProperty("存放地地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "面积")
|
||||
@ExcelProperty("面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@Schema(description = "存放类型", example = "2")
|
||||
@ExcelProperty(value = "存放类型", converter = DictConvert.class)
|
||||
@DictFormat("company_deposit_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String depositType;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 企业管理-资产分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PropertyReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "22729")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "企业id", example = "9124")
|
||||
private String corpId;
|
||||
|
||||
@Schema(description = "部门id", example = "2480")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "存放位置", example = "7241")
|
||||
private String posId;
|
||||
|
||||
@Schema(description = "使用人id", example = "6217")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "资产编号")
|
||||
private String propNo;
|
||||
|
||||
@Schema(description = "资产名称", example = "芋艿")
|
||||
private String propName;
|
||||
|
||||
@Schema(description = "资产分类")
|
||||
private String propCatg;
|
||||
|
||||
@Schema(description = "预计使用年限")
|
||||
private Integer useYear;
|
||||
|
||||
@Schema(description = "价值类型", example = "01")
|
||||
private String costType;
|
||||
|
||||
@Schema(description = "资产数量")
|
||||
private Integer propNum;
|
||||
|
||||
@Schema(description = "资产原值(元)")
|
||||
private BigDecimal costTotal;
|
||||
|
||||
@Schema(description = "资产状态", example = "02")
|
||||
private String propStatus;
|
||||
|
||||
@Schema(description = "品牌")
|
||||
private String brand;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "生产厂家")
|
||||
private String factory;
|
||||
|
||||
@Schema(description = "出场序列号/编号")
|
||||
private String serialNo;
|
||||
|
||||
@Schema(description = "数量计量单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "取得日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate[] getDate;
|
||||
|
||||
@Schema(description = "出厂日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate[] prodDate;
|
||||
|
||||
@Schema(description = "供应商")
|
||||
private String supplier;
|
||||
|
||||
@Schema(description = "启用日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate[] openDate;
|
||||
|
||||
@Schema(description = "净值(元)")
|
||||
private BigDecimal netValue;
|
||||
|
||||
@Schema(description = "凭证号")
|
||||
private String voucherNo;
|
||||
|
||||
@Schema(description = "维修/保养周期单位", example = "2")
|
||||
private String keepCycleType;
|
||||
|
||||
@Schema(description = "维修/保养周期")
|
||||
private Integer keepCycle;
|
||||
|
||||
@Schema(description = "上次维修/保养日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate[] lastKeepDate;
|
||||
|
||||
@Schema(description = "下次维修/保养日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate[] nextKeepDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.Property;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 企业管理-资产 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PropertyRespVO extends Property {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?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="cn.iocoder.yudao.module.cont.mapper.BaseContDataMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,24 @@
|
||||
<?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="cn.iocoder.yudao.module.cont.mapper.BaseContTempMapper">
|
||||
|
||||
<select id="selectListPage" resultType="cn.iocoder.yudao.module.cont.vo.BaseContTempRespVO">
|
||||
SELECT
|
||||
main.*
|
||||
FROM
|
||||
dl_base_cont_temp main
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="entity.tempName != null and entity.tempName != ''">
|
||||
AND main.temp_name LIKE concat('%',#{entity.tempName},'%')
|
||||
</if>
|
||||
<if test="entity.tempType != null and entity.tempType != ''">
|
||||
AND main.temp_type = #{entity.tempType}
|
||||
</if>
|
||||
<if test="entity.tempUse != null and entity.tempUse != ''">
|
||||
AND main.temp_use = #{entity.tempUse}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY main.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
@ -54,4 +54,22 @@
|
||||
tbcb.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="searchBrand" resultType="cn.iocoder.yudao.module.custom.vo.CascaderOptionsVO">
|
||||
SELECT
|
||||
main.brand_name AS 'label',
|
||||
main.id AS 'value',
|
||||
'0' AS 'leaf'
|
||||
FROM
|
||||
base_car_brand main
|
||||
LEFT JOIN base_car_model tbcm ON main.id = tbcm.brand_id
|
||||
WHERE
|
||||
main.deleted = '0'
|
||||
AND tbcm.deleted = '0'
|
||||
<if test="dto.brandName != null and dto.brandName != ''">
|
||||
AND CONCAT( '',main.brand_name, tbcm.model_name, main.abb_name, tbcm.abb_name ) LIKE CONCAT('%',#{dto.brandName},'%')
|
||||
</if>
|
||||
GROUP BY
|
||||
main.id
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -34,8 +34,13 @@
|
||||
|
||||
<select id="findPage" resultType="cn.iocoder.yudao.module.custom.vo.CarMainRespVO">
|
||||
SELECT
|
||||
<include refid="baseCarMainColumn"></include>
|
||||
FROM `base_car_main` tbcm
|
||||
<include refid="baseCarMainColumn"></include>,
|
||||
bcb.brand_name AS brandStr,
|
||||
bcm.model_name AS modelStr
|
||||
FROM
|
||||
`base_car_main` tbcm
|
||||
LEFT JOIN base_car_brand bcb ON bcb.deleted = 0 AND tbcm.car_brand = bcb.id
|
||||
LEFT JOIN base_car_model bcm ON bcm.deleted = 0 AND tbcm.car_model = bcm.id
|
||||
WHERE
|
||||
tbcm.deleted = 0
|
||||
<if test="dto.licenseNumber != null and dto.licenseNumber != ''">
|
||||
@ -72,6 +77,21 @@
|
||||
tbcm.car_register_date DESC
|
||||
</select>
|
||||
|
||||
<select id="findOne" resultType="cn.iocoder.yudao.module.custom.vo.CarMainRespVO">
|
||||
SELECT
|
||||
<include refid="baseCarMainColumn"></include>,
|
||||
bcb.brand_name AS brandStr,
|
||||
bcm.model_name AS modelStr
|
||||
FROM
|
||||
`base_car_main` tbcm
|
||||
LEFT JOIN base_car_brand bcb ON bcb.deleted = 0 AND tbcm.car_brand = bcb.id
|
||||
LEFT JOIN base_car_model bcm ON bcm.deleted = 0 AND tbcm.car_model = bcm.id
|
||||
WHERE
|
||||
tbcm.deleted = 0
|
||||
AND
|
||||
tbcm.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="isDataKeyValueRepeat" resultType="cn.iocoder.yudao.module.custom.entity.CarMain">
|
||||
SELECT
|
||||
tbcm.id
|
||||
|
@ -68,4 +68,46 @@
|
||||
tbcmod.sort DESC
|
||||
</select>
|
||||
|
||||
<select id="searchModelByBrandid" resultType="cn.iocoder.yudao.module.custom.vo.CascaderOptionsVO">
|
||||
SELECT
|
||||
main.model_name AS 'label',
|
||||
main.id AS 'value',
|
||||
'1' AS 'leaf'
|
||||
FROM
|
||||
base_car_model main
|
||||
WHERE
|
||||
main.deleted = '0'
|
||||
<if test="dto.modelName != null and dto.modelName != ''">
|
||||
AND CONCAT( '', main.model_name, main.abb_name ) LIKE CONCAT('%',#{dto.modelName},'%')
|
||||
</if>
|
||||
AND main.brand_id = #{dto.brandId}
|
||||
GROUP BY
|
||||
main.id
|
||||
</select>
|
||||
|
||||
<select id="searchModel" resultType="cn.iocoder.yudao.module.custom.vo.CarModelRespVO">
|
||||
SELECT
|
||||
<include refid="baseCarModelColumn"></include>
|
||||
FROM `base_car_model` tbcmod
|
||||
WHERE
|
||||
tbcmod.deleted = 0
|
||||
<if test="dto.brandId != null and dto.brandId != ''">
|
||||
AND tbcmod.brand_id = #{dto.brandId}
|
||||
</if>
|
||||
<if test="dto.modelName != null and dto.modelName != ''">
|
||||
AND tbcmod.model_name LIKE CONCAT('%',#{dto.modelName},'%')
|
||||
</if>
|
||||
<if test="dto.modelValue != null and dto.modelValue != ''">
|
||||
AND tbcmod.model_value = #{dto.modelValue}
|
||||
</if>
|
||||
<if test="dto.remark != null and dto.remark != ''">
|
||||
AND tbcmod.remark LIKE CONCAT('%',#{dto.remark},'%')
|
||||
</if>
|
||||
<if test="dto.abbName != null and dto.abbName != ''">
|
||||
AND tbcmod.abb_name LIKE CONCAT('%',#{dto.abbName},'%')
|
||||
</if>
|
||||
ORDER BY
|
||||
tbcmod.sort DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -62,11 +62,13 @@
|
||||
<select id="selectCarListByCusId" resultType="cn.iocoder.yudao.module.custom.vo.CarMainRespVO">
|
||||
SELECT
|
||||
<include refid="baseCarMainColumn"></include>,
|
||||
main.is_owner AS isOwner
|
||||
main.is_owner AS isOwner,bcb.brand_name AS brandStr,bcm.model_name AS modelStr
|
||||
FROM
|
||||
base_customer_car main
|
||||
LEFT JOIN
|
||||
base_car_main tbcarm ON main.car_id = tbcarm.id AND tbcarm.deleted = 0
|
||||
LEFT JOIN base_car_brand bcb ON bcb.deleted = 0 AND tbcarm.car_brand = bcb.id
|
||||
LEFT JOIN base_car_model bcm ON bcm.deleted = 0 AND tbcarm.car_model = bcm.id
|
||||
WHERE
|
||||
main.deleted = 0
|
||||
AND
|
||||
|
@ -0,0 +1,12 @@
|
||||
<?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="cn.iocoder.yudao.module.company.dal.mysql.propertydealitem.PropertyDealItemMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?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="cn.iocoder.yudao.module.company.dal.mysql.propertydeal.PropertyDealMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?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="cn.iocoder.yudao.module.company.dal.mysql.propertykeep.PropertyKeepMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?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="cn.iocoder.yudao.module.company.dal.mysql.property.PropertyMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?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="cn.iocoder.yudao.module.company.dal.mysql.property.PropertyPosMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -18,6 +18,9 @@ public class DeptRespVO {
|
||||
@Schema(description = "父部门 ID", example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "祖级列表", example = "1024")
|
||||
private String ancestors;
|
||||
|
||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer sort;
|
||||
|
||||
|
@ -25,6 +25,9 @@ public class DeptSaveReqVO {
|
||||
@Schema(description = "父部门 ID", example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "祖级列表", example = "1024")
|
||||
private String ancestors;
|
||||
|
||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "显示顺序不能为空")
|
||||
private Integer sort;
|
||||
|
@ -38,6 +38,10 @@ public class DeptDO extends TenantBaseDO {
|
||||
* 关联 {@link #id}
|
||||
*/
|
||||
private Long parentId;
|
||||
/**
|
||||
* 祖级列表
|
||||
*/
|
||||
private String ancestors;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
|
@ -45,8 +45,8 @@ public class DeptServiceImpl implements DeptService {
|
||||
if (createReqVO.getParentId() == null) {
|
||||
createReqVO.setParentId(DeptDO.PARENT_ID_ROOT);
|
||||
}
|
||||
// 校验父部门的有效性
|
||||
validateParentDept(null, createReqVO.getParentId());
|
||||
// 校验父部门的有效性同时顺便设置祖级列表
|
||||
createReqVO.setAncestors(validateParentDept(null, createReqVO.getParentId()));
|
||||
// 校验部门名的唯一性
|
||||
validateDeptNameUnique(null, createReqVO.getParentId(), createReqVO.getName());
|
||||
|
||||
@ -66,8 +66,8 @@ public class DeptServiceImpl implements DeptService {
|
||||
}
|
||||
// 校验自己存在
|
||||
validateDeptExists(updateReqVO.getId());
|
||||
// 校验父部门的有效性
|
||||
validateParentDept(updateReqVO.getId(), updateReqVO.getParentId());
|
||||
// 校验父部门的有效性同时顺便设置祖级列表
|
||||
updateReqVO.setAncestors(validateParentDept(null, updateReqVO.getParentId()));
|
||||
// 校验部门名的唯一性
|
||||
validateDeptNameUnique(updateReqVO.getId(), updateReqVO.getParentId(), updateReqVO.getName());
|
||||
|
||||
@ -116,9 +116,10 @@ public class DeptServiceImpl implements DeptService {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void validateParentDept(Long id, Long parentId) {
|
||||
String validateParentDept(Long id, Long parentId) {
|
||||
StringBuilder ancestorsBuilder = new StringBuilder(String.valueOf(parentId));
|
||||
if (parentId == null || DeptDO.PARENT_ID_ROOT.equals(parentId)) {
|
||||
return;
|
||||
return ancestorsBuilder.toString();
|
||||
}
|
||||
// 1. 不能设置自己为父部门
|
||||
if (Objects.equals(id, parentId)) {
|
||||
@ -130,12 +131,26 @@ public class DeptServiceImpl implements DeptService {
|
||||
throw exception(DEPT_PARENT_NOT_EXITS);
|
||||
}
|
||||
// 3. 递归校验父部门,如果父部门是自己的子部门,则报错,避免形成环路
|
||||
if (id == null) { // id 为空,说明新增,不需要考虑环路
|
||||
return;
|
||||
if (id == null) { // id 为空,说明新增,不需要考虑环路,但是需要拼接祖级列表
|
||||
for (int i = 0; i < Short.MAX_VALUE; i++) {
|
||||
// 3.1 校验环路
|
||||
parentId = parentDept.getParentId();
|
||||
ancestorsBuilder.insert(0, parentId + ",");
|
||||
// 3.2 继续递归下一级父部门
|
||||
if (parentId == null || DeptDO.PARENT_ID_ROOT.equals(parentId)) {
|
||||
break;
|
||||
}
|
||||
parentDept = deptMapper.selectById(parentId);
|
||||
if (parentDept == null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ancestorsBuilder.toString();
|
||||
}
|
||||
for (int i = 0; i < Short.MAX_VALUE; i++) {
|
||||
// 3.1 校验环路
|
||||
parentId = parentDept.getParentId();
|
||||
ancestorsBuilder.insert(0, parentId + ",");
|
||||
if (Objects.equals(id, parentId)) {
|
||||
throw exception(DEPT_PARENT_IS_CHILD);
|
||||
}
|
||||
@ -148,6 +163,7 @@ public class DeptServiceImpl implements DeptService {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ancestorsBuilder.toString();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
Loading…
Reference in New Issue
Block a user