diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java index a1cb7160..8f98162a 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java @@ -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"; /**编辑标识*/ diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/controller/admin/BaseContDataController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/controller/admin/BaseContDataController.java new file mode 100644 index 00000000..cfd203b0 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/controller/admin/BaseContDataController.java @@ -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 { + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/controller/admin/BaseContTempController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/controller/admin/BaseContTempController.java new file mode 100644 index 00000000..fab1f662 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/controller/admin/BaseContTempController.java @@ -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> + * @author PQZ + * @date 10:46 2024/8/8 + **/ + @GetMapping("/page") + @Operation(summary = "获得合同模板分页") + @PreAuthorize("@ss.hasPermission('base:cont-temp:query')") + public CommonResult> getContTempPage(BaseContTempPageReqVO pageReqVO, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { + Page page = new Page<>(pageNo, pageSize); + return success(contTempService.getContTempPage(pageReqVO, page)); + } + + /** + * 创建合同模板 + * + * @param createReqVO BaseContTempSaveReqVO + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 17:11 2024/8/8 + **/ + @PostMapping("/create") + @Operation(summary = "创建合同模板") + @PreAuthorize("@ss.hasPermission('base:cont-temp:create')") + public CommonResult createContTemp(@Valid @RequestBody BaseContTempSaveReqVO createReqVO) { + contTempService.saveConTemp(createReqVO); + return success(true); + } + + /** + * 编辑合同模板 + * + * @param updateReqVO BaseContTempSaveReqVO + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 17:11 2024/8/8 + **/ + @PutMapping("/update") + @Operation(summary = "更新合同模板") + @PreAuthorize("@ss.hasPermission('base:cont-temp:update')") + public CommonResult updateContTemp(@Valid @RequestBody BaseContTempSaveReqVO updateReqVO) { + contTempService.saveConTemp(updateReqVO); + return success(true); + } + + /** + * 删除合同模板 + * + * @param id 合同模板id + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @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 deleteContTemp(@RequestParam("id") String id) { + contTempService.deleteContTemp(id); + return success(true); + } + + /** + * 通过id查询合同模板 + * + * @param id id + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @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 getContTemp(@RequestParam("id") String id) { + BaseContTemp contTemp = contTempService.getContTemp(id); + return success(BeanUtils.toBean(contTemp, BaseContTempRespVO.class)); + } + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/entity/BaseContData.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/entity/BaseContData.java new file mode 100644 index 00000000..7cf6009e --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/entity/BaseContData.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/entity/BaseContTemp.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/entity/BaseContTemp.java new file mode 100644 index 00000000..6a8b8c7f --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/entity/BaseContTemp.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/mapper/BaseContDataMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/mapper/BaseContDataMapper.java new file mode 100644 index 00000000..e699f9fe --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/mapper/BaseContDataMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/mapper/BaseContTempMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/mapper/BaseContTempMapper.java new file mode 100644 index 00000000..ea133907 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/mapper/BaseContTempMapper.java @@ -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 { + + + /** + * 合同模板分页列表查询 + * + * @param pageReqVO 合同模板pageReq扩展类 + * @param page 分页参数 + * @return com.baomidou.mybatisplus.core.metadata.IPage + * @author PQZ + * @date 10:40 2024/8/8 + **/ + IPage selectListPage(@Param("entity") BaseContTempPageReqVO pageReqVO, Page page); +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/BaseContDataService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/BaseContDataService.java new file mode 100644 index 00000000..d20a0a35 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/BaseContDataService.java @@ -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 { + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/BaseContTempService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/BaseContTempService.java new file mode 100644 index 00000000..b3b4d2e3 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/BaseContTempService.java @@ -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 { + + + /** + * 保存合同模板 + * + * @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 + * @author PQZ + * @date 10:39 2024/8/8 + **/ + IPage getContTempPage(BaseContTempPageReqVO pageReqVO, Page page); + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/impl/BaseContDataServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/impl/BaseContDataServiceImpl.java new file mode 100644 index 00000000..ca179bcf --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/impl/BaseContDataServiceImpl.java @@ -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 implements BaseContDataService { + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/impl/BaseContTempServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/impl/BaseContTempServiceImpl.java new file mode 100644 index 00000000..2db5a2a5 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/service/impl/BaseContTempServiceImpl.java @@ -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 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 + * @author PQZ + * @date 10:39 2024/8/8 + **/ + @Override + public IPage getContTempPage(BaseContTempPageReqVO pageReqVO, Page page) { + return contTempMapper.selectListPage(pageReqVO, page); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempPageReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempPageReqVO.java new file mode 100644 index 00000000..9769a24b --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempPageReqVO.java @@ -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 { + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempRespVO.java new file mode 100644 index 00000000..cab35f0b --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempRespVO.java @@ -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 { + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempSaveReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempSaveReqVO.java new file mode 100644 index 00000000..6e04f4bf --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/cont/vo/BaseContTempSaveReqVO.java @@ -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 { + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarBrandController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarBrandController.java index 18c476e8..8f438392 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarBrandController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarBrandController.java @@ -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 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 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 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 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> getCarBrandPage(CarBrandReqVO pageReqVO) { IPage 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, diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java index 4010dcdb..28d76fe4 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java @@ -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 bindCustomerCar(@RequestBody CustomerMainSaveReqVO saveReqVO) { + public CommonResult bindCustomerCar(@RequestBody CarMainReqVO saveReqVO) { carMainService.bindCustomAndCar(saveReqVO); return success(true); } + /** + * 设置标签 + * + * @param saveReqVO CustomerMainSaveReqVO + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 16:35 2024/8/6 + **/ + @PostMapping("/setLabel") + @Operation(summary = "设置标签") + public CommonResult setLabel(@RequestBody CarMainReqVO saveReqVO) { + busiLabelService.saveBusiLable(saveReqVO.getId(), TABLE_BASE_CAR_MAIN, saveReqVO.getLabelList()); + return success(true); + } + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarModelController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarModelController.java index 022bab19..af569312 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarModelController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarModelController.java @@ -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 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> searchBrand(@RequestBody CarModelReqVO reqVO) { + List result = carModelService.searchBrand(reqVO); + return success(result); + } + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyController.java new file mode 100644 index 00000000..80397052 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyController.java @@ -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 createProperty(@RequestBody PropertyReqVO createReqVO) { + return success(propertyService.createProperty(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新企业管理-资产") + @PreAuthorize("@ss.hasPermission('company:property:update')") + public CommonResult 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 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 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> getPropertyPage(PropertyReqVO pageReqVO) { + IPage 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 list = propertyService.getPropertyPage(pageReqVO).getRecords(); + // 导出 Excel + ExcelUtils.write(response, "企业管理-资产.xls", "数据", PropertyRespVO.class, list); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyDealController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyDealController.java new file mode 100644 index 00000000..4a9c21d6 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyDealController.java @@ -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 createPropertyDeal(@RequestBody PropertyDealReqVO createReqVO) { + return success(propertyDealService.createPropertyDeal(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新企业管理-资产处置单/变动单") + @PreAuthorize("@ss.hasPermission('company:property-deal:update')") + public CommonResult 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 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 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> getPropertyDealPage(PropertyDealReqVO pageReqVO) { + IPage 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 list = propertyDealService.getPropertyDealPage(pageReqVO).getRecords(); + // 导出 Excel + ExcelUtils.write(response, "企业管理-资产处置单/变动单.xls", "数据", PropertyDealRespVO.class,list); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyDealItemController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyDealItemController.java new file mode 100644 index 00000000..2d5418a1 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyDealItemController.java @@ -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 createPropertyDealItem(@RequestBody PropertyDealItemReqVO createReqVO) { + return success(propertyDealItemService.createPropertyDealItem(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新企业管理-资产处置子") + @PreAuthorize("@ss.hasPermission('company:property-deal-item:update')") + public CommonResult 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 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 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> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO) { + IPage 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 list = propertyDealItemService.getPropertyDealItemPage(pageReqVO).getRecords(); + // 导出 Excel + ExcelUtils.write(response, "企业管理-资产处置子.xls", "数据", PropertyDealItemRespVO.class,list); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyKeepController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyKeepController.java new file mode 100644 index 00000000..be736424 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyKeepController.java @@ -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 createPropertyKeep(@RequestBody PropertyKeepReqVO createReqVO) { + return success(propertyKeepService.createPropertyKeep(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新资产维修/保养记录") + @PreAuthorize("@ss.hasPermission('company:property-keep:update')") + public CommonResult 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 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 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> getPropertyKeepPage(PropertyKeepReqVO pageReqVO) { + IPage 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 list = propertyKeepService.getPropertyKeepPage(pageReqVO).getRecords(); + // 导出 Excel + ExcelUtils.write(response, "资产维修/保养记录.xls", "数据", PropertyKeepRespVO.class, list); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyPosController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyPosController.java new file mode 100644 index 00000000..78ed3255 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/PropertyPosController.java @@ -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 createPropertyPos(@RequestBody PropertyPosReqVO createReqVO) { + return success(propertyPosService.createPropertyPos(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新企业管理-资产存放位置") + @PreAuthorize("@ss.hasPermission('company:property-pos:update')") + public CommonResult 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 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 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> getPropertyPosPage(PropertyPosReqVO pageReqVO) { + IPage 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 list = propertyPosService.getPropertyPosPage(pageReqVO).getRecords(); + // 导出 Excel + ExcelUtils.write(response, "企业管理-资产存放位置.xls", "数据", PropertyPosRespVO.class,list); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/Property.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/Property.java new file mode 100644 index 00000000..4fa8ccdd --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/Property.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyDealDO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyDealDO.java new file mode 100644 index 00000000..f41253a9 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyDealDO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyDealItemDO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyDealItemDO.java new file mode 100644 index 00000000..f1edfcad --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyDealItemDO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyKeep.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyKeep.java new file mode 100644 index 00000000..494cc79d --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyKeep.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyPosDO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyPosDO.java new file mode 100644 index 00000000..8fb6bf09 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/PropertyPosDO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarBrandMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarBrandMapper.java index ac5256f8..7e6a70b0 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarBrandMapper.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarBrandMapper.java @@ -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 { IPage findPage(Page page,@Param("dto") CarBrandReqVO reqVO); + List searchBrand(@Param("dto") CarBrandReqVO reqVO); + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarMainMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarMainMapper.java index e69e856f..f4223db8 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarMainMapper.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarMainMapper.java @@ -29,6 +29,14 @@ public interface CarMainMapper extends BaseMapper { */ IPage findPage(Page page, @Param("dto") CarMainReqVO pageReqVO); + /** + * 获得车辆信息分页 + * + * @param id + * @return + */ + CarMainRespVO findOne(@Param("id") String id); + /** diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarModelMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarModelMapper.java index cadbceb9..e798b5e3 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarModelMapper.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CarModelMapper.java @@ -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 { IPage getCarModelPageByBrandId(Page page, @Param("dto") CarModelReqVO reqVO); + List searchModelByBrandid(@Param("dto") CarModelReqVO reqVO); + +// List searchModel(@Param("dto") CarModelReqVO reqVO); + + + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyDealItemMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyDealItemMapper.java new file mode 100644 index 00000000..5ac8fff5 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyDealItemMapper.java @@ -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 { + + default IPage selectPage(PropertyDealItemReqVO reqVO) { + return null; + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyDealMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyDealMapper.java new file mode 100644 index 00000000..f77d1002 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyDealMapper.java @@ -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 { + + default IPage selectPage(PropertyDealReqVO reqVO) { + return null; + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyKeepMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyKeepMapper.java new file mode 100644 index 00000000..360cda63 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyKeepMapper.java @@ -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 { + + default IPage selectPage(PropertyKeepReqVO reqVO) { + return null; + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyMapper.java new file mode 100644 index 00000000..72b705e4 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyMapper.java @@ -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 { + + default IPage selectPage(PropertyReqVO reqVO) { + return null; + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyPosMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyPosMapper.java new file mode 100644 index 00000000..dd9e7d33 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/PropertyPosMapper.java @@ -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 { + + default IPage selectPage(PropertyPosReqVO reqVO) { + return null; + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java index 8dbf9ec2..94c236db 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java @@ -65,5 +65,5 @@ public interface CarMainService extends IService { * @param saveReqVO CustomerMainSaveReqVO实体 * @return void **/ - void bindCustomAndCar(CustomerMainSaveReqVO saveReqVO); + void bindCustomAndCar(CarMainReqVO saveReqVO); } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java index d40cc39b..793ee7bd 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java @@ -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 { */ IPage getCarModelPageByBrandId(CarModelReqVO pageReqVO); + /** + * 获取品牌型号级联下拉 + * + * @param reqVO + * @return + */ + List searchBrand(CarModelReqVO reqVO); + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyDealItemService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyDealItemService.java new file mode 100644 index 00000000..e771a503 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyDealItemService.java @@ -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 { + + /** + * 创建企业管理-资产处置子 + * + * @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 getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO); + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyDealService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyDealService.java new file mode 100644 index 00000000..738fe16d --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyDealService.java @@ -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 { + + /** + * 创建企业管理-资产处置单/变动单 + * + * @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 getPropertyDealPage(PropertyDealReqVO pageReqVO); + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyKeepService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyKeepService.java new file mode 100644 index 00000000..18219535 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyKeepService.java @@ -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 { + + /** + * 创建资产维修/保养记录 + * + * @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 getPropertyKeepPage(PropertyKeepReqVO pageReqVO); + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyPosService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyPosService.java new file mode 100644 index 00000000..c80de4a9 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyPosService.java @@ -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 { + + /** + * 创建企业管理-资产存放位置 + * + * @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 getPropertyPosPage(PropertyPosReqVO pageReqVO); + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyService.java new file mode 100644 index 00000000..3bc25573 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/PropertyService.java @@ -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 { + + /** + * 创建企业管理-资产 + * + * @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 getPropertyPage(PropertyReqVO pageReqVO); + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarBrandServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarBrandServiceImpl.java index dfd890d4..4cb46d9e 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarBrandServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarBrandServiceImpl.java @@ -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 implements CarBrandService { + /** + * 创建车辆品牌维护 + * + * @param createReqVO 创建信息 + * @return 编号 + */ @Override public String createCarBrand(CarBrandReqVO createReqVO) { // 插入 @@ -35,6 +39,11 @@ public class CarBrandServiceImpl extends ServiceImpl i return carBrand.getId(); } + /** + * 更新车辆品牌维护 + * + * @param updateReqVO 更新信息 + */ @Override public void updateCarBrand(CarBrandReqVO updateReqVO) { @@ -43,19 +52,34 @@ public class CarBrandServiceImpl extends ServiceImpl 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 getCarBrandPage(CarBrandReqVO pageReqVO) { Page page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java index 2e801f00..10373e6f 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java @@ -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 impl @Autowired private CustomerCarService customerCarService; + @Autowired + private BusiLabelService busiLabelService; + + /** * 创建车辆信息 * @@ -65,8 +62,19 @@ public class CarMainServiceImpl extends ServiceImpl impl } } + //车俩品牌型号级联选择器返回值,第一位是品牌,第二位是型号 + List 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 impl } } - // 更新 - CarMain updateObj = BeanUtils.toBean(updateReqVO, CarMain.class); - baseMapper.updateById(updateObj); + //车俩品牌型号级联选择器返回值,第一位是品牌,第二位是型号 + List 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 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 brandAndModel = new ArrayList<>(); + brandAndModel.add(carMainRespVO.getCarBrand()); + brandAndModel.add(carMainRespVO.getCarModel()); + + carMainRespVO.setBrandAndModel(brandAndModel); //联查客户信息 List cusList = customerCarMapper.selectCusListByCarId(id); - result.setCusList(cusList); + carMainRespVO.setCusList(cusList); - return result; + //联查标签信息 + List labelList = busiLabelService.listByMainId(id); + carMainRespVO.setLabelList(labelList); + + return carMainRespVO; } /** @@ -152,7 +179,7 @@ public class CarMainServiceImpl extends ServiceImpl impl * @return void **/ @Override - public void bindCustomAndCar(CustomerMainSaveReqVO saveReqVO) { + public void bindCustomAndCar(CarMainReqVO saveReqVO) { List customerCars = new ArrayList<>(); List cusList = saveReqVO.getCusList(); if (ObjectUtil.isNotEmpty(cusList)){ diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java index 9c6908fe..02d3aed0 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java @@ -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 implements CarModelService { + @Autowired + CarBrandMapper carBrandMapper; + + /** + * 创建车辆品牌型号 + * + * @param createReqVO 创建信息 + * @return 编号 + */ @Override public String createCarModel(CarModelReqVO createReqVO) { // 插入 @@ -37,6 +47,11 @@ public class CarModelServiceImpl extends ServiceImpl i return carModel.getId(); } + /** + * 更新车辆品牌型号 + * + * @param updateReqVO 更新信息 + */ @Override public void updateCarModel(CarModelReqVO updateReqVO) { // 更新 @@ -44,26 +59,47 @@ public class CarModelServiceImpl extends ServiceImpl 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 getCarModelPage(CarModelReqVO pageReqVO) { //取分页参数 Page page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); return baseMapper.findPage(page,pageReqVO); - } - + } + + /** + * 获得车辆品牌型号分页 + * + * @param pageReqVO 分页查询 + * @return 车辆品牌型号分页 + */ @Override public IPage getCarModelPageByBrandId(CarModelReqVO pageReqVO) { //取分页参数 @@ -71,4 +107,41 @@ public class CarModelServiceImpl extends ServiceImpl i return baseMapper.findPage(page,pageReqVO); } + /** + * 获取品牌型号级联下拉 + * + * @param reqVO + * @return + */ + @Override + public List searchBrand(CarModelReqVO reqVO) { + + CarBrandReqVO brandQuery = new CarBrandReqVO(); + brandQuery.setBrandName(reqVO.getModelName()); + List nameResult = carBrandMapper.searchBrand(brandQuery); + + return getChildModel(nameResult,reqVO.getModelName()); + } + + /** + * 根据父级品牌集合取所有的型号子选项 + * + * @param brands + * @return + */ + private List getChildModel(List brands,String name){ + //遍历父级数据 + for (CascaderOptionsVO brandItem: brands) { + CarModelReqVO query = new CarModelReqVO(); + query.setBrandId(brandItem.getValue()); + query.setModelName(name); + //取品牌下属型号选项 + List models = baseMapper.searchModelByBrandid(query); + //父级数据拼装 + brandItem.setChildren(models); + + } + return brands; + } + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyDealItemServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyDealItemServiceImpl.java new file mode 100644 index 00000000..1f4599ec --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyDealItemServiceImpl.java @@ -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 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 getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO) { + return baseMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyDealServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyDealServiceImpl.java new file mode 100644 index 00000000..8f7f0b2f --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyDealServiceImpl.java @@ -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 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 getPropertyDealPage(PropertyDealReqVO pageReqVO) { + return baseMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyKeepServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyKeepServiceImpl.java new file mode 100644 index 00000000..bc246af9 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyKeepServiceImpl.java @@ -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 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 getPropertyKeepPage(PropertyKeepReqVO pageReqVO) { + return baseMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyPosServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyPosServiceImpl.java new file mode 100644 index 00000000..91750cc8 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyPosServiceImpl.java @@ -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 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 getPropertyPosPage(PropertyPosReqVO pageReqVO) { + return baseMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyServiceImpl.java new file mode 100644 index 00000000..cf2767ec --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/PropertyServiceImpl.java @@ -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 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 getPropertyPage(PropertyReqVO pageReqVO) { + return baseMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java index 95f2fc40..dba7d736 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainReqVO.java @@ -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 cusList; + + @Schema(description = "车辆绑定标签信息") + List labelList; + /**车辆品牌型号数组*/ + List brandAndModel; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainRespVO.java index 49e46ca5..eb533506 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainRespVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarMainRespVO.java @@ -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 cusList; + @Schema(description = "标签信息") + List labelList; + /**品牌字符*/ + String brandStr; + /**型号字符*/ + String modelStr; + + + /**车辆品牌型号数组*/ + List brandAndModel; diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelReqVO.java index 1781f598..7ecf2663 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelReqVO.java @@ -44,4 +44,5 @@ public class CarModelReqVO extends PageParam { + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelRespVO.java index f9d47bd4..20348a6a 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelRespVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelRespVO.java @@ -17,4 +17,9 @@ public class CarModelRespVO extends CarModel { @ExcelProperty("创建时间") private LocalDateTime createTime; +// /** +// * 车辆品牌型号选项 +// */ +// List modelOptions; + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CascaderOptionsVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CascaderOptionsVO.java new file mode 100644 index 00000000..f84aa352 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CascaderOptionsVO.java @@ -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 children; + /** + * 懒加载:是否为叶子节点 0父 1子 + */ + int leaf; + +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java index 90df7a00..22a42ce9 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java @@ -26,6 +26,8 @@ public class CustomerMainRespVO extends CustomerMain { List attnList; /**标签信息*/ List labelList; + /**车辆品牌型号数组*/ + List brandAndModel; /**是否车主(0否1是)*/ private String isOwner; diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java index 97efbd47..1989cd30 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java @@ -16,8 +16,6 @@ public class CustomerMainSaveReqVO extends CustomerMain { private List itemList; /**客户绑定车辆信息*/ private List carList; - /**客户绑定车辆信息*/ - private List cusList; /**标签信息*/ List labelList; diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealItemReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealItemReqVO.java new file mode 100644 index 00000000..38648b19 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealItemReqVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealItemRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealItemRespVO.java new file mode 100644 index 00000000..0a7fc4e9 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealItemRespVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealReqVO.java new file mode 100644 index 00000000..1cebdff3 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealReqVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealRespVO.java new file mode 100644 index 00000000..27c5e635 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyDealRespVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyKeepReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyKeepReqVO.java new file mode 100644 index 00000000..451b1aee --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyKeepReqVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyKeepRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyKeepRespVO.java new file mode 100644 index 00000000..af7b40ae --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyKeepRespVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyPosReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyPosReqVO.java new file mode 100644 index 00000000..26ccf5cd --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyPosReqVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyPosRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyPosRespVO.java new file mode 100644 index 00000000..dd1605d7 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyPosRespVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyReqVO.java new file mode 100644 index 00000000..117195ba --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyReqVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyRespVO.java new file mode 100644 index 00000000..2de03972 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/PropertyRespVO.java @@ -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; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/cont/BaseContData.xml b/dl-module-base/src/main/resources/mapper/cont/BaseContData.xml new file mode 100644 index 00000000..e4db33e8 --- /dev/null +++ b/dl-module-base/src/main/resources/mapper/cont/BaseContData.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/cont/BaseContTemp.xml b/dl-module-base/src/main/resources/mapper/cont/BaseContTemp.xml new file mode 100644 index 00000000..ef2cfb7d --- /dev/null +++ b/dl-module-base/src/main/resources/mapper/cont/BaseContTemp.xml @@ -0,0 +1,24 @@ + + + + + + \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/CarBrandMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CarBrandMapper.xml index 7b2ebd87..7eec2559 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CarBrandMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CarBrandMapper.xml @@ -54,4 +54,22 @@ tbcb.create_time DESC + + \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml index f9fd3c5a..708155b5 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml @@ -34,8 +34,13 @@ + + + + + + \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/CustomerCarMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CustomerCarMapper.xml index 7ecdf257..c90e9ed1 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CustomerCarMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CustomerCarMapper.xml @@ -62,11 +62,13 @@