Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.CapitalApplicationVo;
|
||||
import org.dromara.property.domain.bo.CapitalApplicationBo;
|
||||
import org.dromara.property.service.ICapitalApplicationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 资产申请
|
||||
* 前端访问路由地址为:/domain/application
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/capitalApplication")
|
||||
public class CapitalApplicationController extends BaseController {
|
||||
|
||||
private final ICapitalApplicationService capitalApplicationService;
|
||||
|
||||
/**
|
||||
* 查询资产申请列表
|
||||
*/
|
||||
@SaCheckPermission("domain:application:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CapitalApplicationVo> list(CapitalApplicationBo bo, PageQuery pageQuery) {
|
||||
return capitalApplicationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资产申请列表
|
||||
*/
|
||||
@SaCheckPermission("domain:application:export")
|
||||
@Log(title = "资产申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CapitalApplicationBo bo, HttpServletResponse response) {
|
||||
List<CapitalApplicationVo> list = capitalApplicationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "资产申请", CapitalApplicationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资产申请详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("domain:application:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CapitalApplicationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(capitalApplicationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产申请
|
||||
*/
|
||||
@SaCheckPermission("domain:application:add")
|
||||
@Log(title = "资产申请", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody CapitalApplicationBo bo) {
|
||||
return toAjax(capitalApplicationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产申请
|
||||
*/
|
||||
@SaCheckPermission("domain:application:edit")
|
||||
@Log(title = "资产申请", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CapitalApplicationBo bo) {
|
||||
return toAjax(capitalApplicationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产申请
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("domain:application:remove")
|
||||
@Log(title = "资产申请", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(capitalApplicationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.CarInfoVo;
|
||||
import org.dromara.property.domain.bo.CarInfoBo;
|
||||
import org.dromara.property.service.ICarInfoService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆信息
|
||||
* 前端访问路由地址为:/property/carInfo
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/carInfo")
|
||||
public class CarInfoController extends BaseController {
|
||||
|
||||
private final ICarInfoService carInfoService;
|
||||
|
||||
/**
|
||||
* 查询车辆管理-车辆信息列表
|
||||
*/
|
||||
@SaCheckPermission("property:carInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CarInfoVo> list(CarInfoBo bo, PageQuery pageQuery) {
|
||||
return carInfoService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车辆管理-车辆信息列表
|
||||
*/
|
||||
@SaCheckPermission("property:carInfo:export")
|
||||
@Log(title = "车辆管理-车辆信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CarInfoBo bo, HttpServletResponse response) {
|
||||
List<CarInfoVo> list = carInfoService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "车辆管理-车辆信息", CarInfoVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆管理-车辆信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:carInfo:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CarInfoVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(carInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆管理-车辆信息
|
||||
*/
|
||||
@SaCheckPermission("property:carInfo:add")
|
||||
@Log(title = "车辆管理-车辆信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody CarInfoBo bo) {
|
||||
return toAjax(carInfoService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆管理-车辆信息
|
||||
*/
|
||||
@SaCheckPermission("property:carInfo:edit")
|
||||
@Log(title = "车辆管理-车辆信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CarInfoBo bo) {
|
||||
return toAjax(carInfoService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆管理-车辆信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:carInfo:remove")
|
||||
@Log(title = "车辆管理-车辆信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(carInfoService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.CarTypeVo;
|
||||
import org.dromara.property.domain.bo.CarTypeBo;
|
||||
import org.dromara.property.service.ICarTypeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆类型
|
||||
* 前端访问路由地址为:/property/carType
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/carType")
|
||||
public class CarTypeController extends BaseController {
|
||||
|
||||
private final ICarTypeService carTypeService;
|
||||
|
||||
/**
|
||||
* 查询车辆管理-车辆类型列表
|
||||
*/
|
||||
@SaCheckPermission("property:carType:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CarTypeVo> list(CarTypeBo bo, PageQuery pageQuery) {
|
||||
return carTypeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出车辆管理-车辆类型列表
|
||||
*/
|
||||
@SaCheckPermission("property:carType:export")
|
||||
@Log(title = "车辆管理-车辆类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CarTypeBo bo, HttpServletResponse response) {
|
||||
List<CarTypeVo> list = carTypeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "车辆管理-车辆类型", CarTypeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆管理-车辆类型详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:carType:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CarTypeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(carTypeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆管理-车辆类型
|
||||
*/
|
||||
@SaCheckPermission("property:carType:add")
|
||||
@Log(title = "车辆管理-车辆类型", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody CarTypeBo bo) {
|
||||
return toAjax(carTypeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆管理-车辆类型
|
||||
*/
|
||||
@SaCheckPermission("property:carType:edit")
|
||||
@Log(title = "车辆管理-车辆类型", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CarTypeBo bo) {
|
||||
return toAjax(carTypeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆管理-车辆类型
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:carType:remove")
|
||||
@Log(title = "车辆管理-车辆类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(carTypeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.MaintainKnowledgeVo;
|
||||
import org.dromara.property.domain.bo.MaintainKnowledgeBo;
|
||||
import org.dromara.property.service.IMaintainKnowledgeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 维保知识
|
||||
* 前端访问路由地址为:/domain/knowledge
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/knowledge")
|
||||
public class MaintainKnowledgeController extends BaseController {
|
||||
|
||||
private final IMaintainKnowledgeService maintainKnowledgeService;
|
||||
|
||||
/**
|
||||
* 查询维保知识列表
|
||||
*/
|
||||
@SaCheckPermission("domain:knowledge:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MaintainKnowledgeVo> list(MaintainKnowledgeBo bo, PageQuery pageQuery) {
|
||||
return maintainKnowledgeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出维保知识列表
|
||||
*/
|
||||
@SaCheckPermission("domain:knowledge:export")
|
||||
@Log(title = "维保知识", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MaintainKnowledgeBo bo, HttpServletResponse response) {
|
||||
List<MaintainKnowledgeVo> list = maintainKnowledgeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "维保知识", MaintainKnowledgeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取维保知识详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("domain:knowledge:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MaintainKnowledgeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(maintainKnowledgeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增维保知识
|
||||
*/
|
||||
@SaCheckPermission("domain:knowledge:add")
|
||||
@Log(title = "维保知识", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MaintainKnowledgeBo bo) {
|
||||
return toAjax(maintainKnowledgeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改维保知识
|
||||
*/
|
||||
@SaCheckPermission("domain:knowledge:edit")
|
||||
@Log(title = "维保知识", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MaintainKnowledgeBo bo) {
|
||||
return toAjax(maintainKnowledgeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除维保知识
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("domain:knowledge:remove")
|
||||
@Log(title = "维保知识", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(maintainKnowledgeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,95 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 资产申请对象 capital_application
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("capital_application")
|
||||
public class CapitalApplication extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 审核人意见
|
||||
*/
|
||||
private String auditOpinion;
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private Long audit;
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
private Long depotId;
|
||||
|
||||
/**
|
||||
* 申请人id
|
||||
*/
|
||||
private Long applicat;
|
||||
|
||||
/**
|
||||
* 申请人手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplier;
|
||||
|
||||
/**
|
||||
* 采购方式
|
||||
*/
|
||||
private String buyType;
|
||||
|
||||
/**
|
||||
* 采购单价
|
||||
*/
|
||||
private BigDecimal buyUnitPrice;
|
||||
|
||||
/**
|
||||
* 采购金额
|
||||
*/
|
||||
private BigDecimal buyAmount;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private Date applicationTime;
|
||||
|
||||
}
|
@@ -0,0 +1,77 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 资产信息对象 capital_info
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("capital_info")
|
||||
public class CapitalInfo extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 资产名称
|
||||
*/
|
||||
private String capitalName;
|
||||
|
||||
/**
|
||||
* 资产类型
|
||||
*/
|
||||
private String capitalType;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 资产申请id
|
||||
*/
|
||||
private Long capitalApplicationId;
|
||||
|
||||
/**
|
||||
* 购买数量
|
||||
*/
|
||||
private Integer buyQuantity;
|
||||
|
||||
/**
|
||||
* 采购单价
|
||||
*/
|
||||
private BigDecimal buyUnitPrice;
|
||||
|
||||
/**
|
||||
* 金额小计
|
||||
*/
|
||||
private BigDecimal buyAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,83 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆信息对象 car_info
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("car_info")
|
||||
public class CarInfo extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carNumber;
|
||||
|
||||
/**
|
||||
* 车架号
|
||||
*/
|
||||
private String carFrameNumber;
|
||||
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String carColour;
|
||||
|
||||
/**
|
||||
* 品牌型号
|
||||
*/
|
||||
private String carBrand;
|
||||
|
||||
/**
|
||||
* 车辆类型id
|
||||
*/
|
||||
private Long carTypeId;
|
||||
|
||||
/**
|
||||
* 登记日期
|
||||
*/
|
||||
private Date carRecordDates;
|
||||
|
||||
/**
|
||||
* 预计停留
|
||||
*/
|
||||
private Integer plannedStay;
|
||||
|
||||
/**
|
||||
* 车主
|
||||
*/
|
||||
private Long carOwners;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆类型对象 car_type
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("car_type")
|
||||
public class CarType extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 车辆类型编码
|
||||
*/
|
||||
private String carTypeNumber;
|
||||
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
private String carTypeName;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,68 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 维保知识对象 maintain_knowledge
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("maintain_knowledge")
|
||||
public class MaintainKnowledge extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 状态(0草稿1状态2已发布)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 封面
|
||||
*/
|
||||
private String covers;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String depict;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private Date releaseTime;
|
||||
|
||||
/**
|
||||
* 位置类型(0操作指引,1处理案例2常见问题)
|
||||
*/
|
||||
private String type;
|
||||
|
||||
|
||||
}
|
@@ -40,6 +40,10 @@ public class ResidentPerson extends TenantEntity {
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 人员类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@@ -84,10 +88,22 @@ public class ResidentPerson extends TenantEntity {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 权限组
|
||||
*/
|
||||
private Long authGroupId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date authBegDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date authEndDate;
|
||||
|
||||
/**
|
||||
* e8平台id
|
||||
*/
|
||||
|
@@ -83,6 +83,16 @@ public class ResidentUnit extends TenantEntity {
|
||||
*/
|
||||
private Long authGroupId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date authBegDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date authEndDate;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
|
@@ -0,0 +1,102 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.CapitalApplication;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 资产申请业务对象 capital_application
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = CapitalApplication.class, reverseConvertGenerate = false)
|
||||
public class CapitalApplicationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
private Long depotId;
|
||||
/**
|
||||
* 申请人id
|
||||
*/
|
||||
@NotNull(message = "申请人id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long applicat;
|
||||
|
||||
/**
|
||||
* 申请人手机号
|
||||
*/
|
||||
@NotBlank(message = "申请人手机号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
@NotNull(message = "供应商id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long supplier;
|
||||
|
||||
/**
|
||||
* 采购方式
|
||||
*/
|
||||
@NotBlank(message = "采购方式不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String buyType;
|
||||
|
||||
/**
|
||||
* 采购单价
|
||||
*/
|
||||
private BigDecimal buyUnitPrice;
|
||||
|
||||
/**
|
||||
* 采购金额
|
||||
*/
|
||||
private BigDecimal buyAmount;
|
||||
/**
|
||||
* 审核人意见
|
||||
*/
|
||||
private String auditOpinion;
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private Long audit;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private Date applicationTime;
|
||||
@NotEmpty(message = "资产不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private List<CapitalInfoBo> capitalInfoBolist;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.CapitalInfo;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 资产信息业务对象 capital_info
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = CapitalInfo.class, reverseConvertGenerate = false)
|
||||
public class CapitalInfoBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 资产名称
|
||||
*/
|
||||
@NotBlank(message = "资产名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String capitalName;
|
||||
|
||||
/**
|
||||
* 资产类型
|
||||
*/
|
||||
@NotBlank(message = "资产类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String capitalType;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@NotBlank(message = "规格不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 资产申请id
|
||||
*/
|
||||
private Long capitalApplicationId;
|
||||
|
||||
/**
|
||||
* 购买数量
|
||||
*/
|
||||
@NotNull(message = "购买数量不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer buyQuantity;
|
||||
|
||||
/**
|
||||
* 采购单价
|
||||
*/
|
||||
@NotNull(message = "采购单价不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal buyUnitPrice;
|
||||
|
||||
/**
|
||||
* 金额小计
|
||||
*/
|
||||
private BigDecimal buyAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,78 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.CarInfo;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆信息业务对象 car_info
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = CarInfo.class, reverseConvertGenerate = false)
|
||||
public class CarInfoBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
@NotBlank(message = "车牌号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String carNumber;
|
||||
|
||||
/**
|
||||
* 车架号
|
||||
*/
|
||||
@NotBlank(message = "车架号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String carFrameNumber;
|
||||
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String carColour;
|
||||
|
||||
/**
|
||||
* 品牌型号
|
||||
*/
|
||||
private String carBrand;
|
||||
|
||||
/**
|
||||
* 车辆类型id
|
||||
*/
|
||||
private Long carTypeId;
|
||||
|
||||
/**
|
||||
* 登记日期
|
||||
*/
|
||||
private Date carRecordDates;
|
||||
|
||||
/**
|
||||
* 预计停留
|
||||
*/
|
||||
private Integer plannedStay;
|
||||
|
||||
/**
|
||||
* 车主
|
||||
*/
|
||||
private Long carOwners;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.CarType;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆类型业务对象 car_type
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = CarType.class, reverseConvertGenerate = false)
|
||||
public class CarTypeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 车辆类型编码
|
||||
*/
|
||||
@NotBlank(message = "车辆类型编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String carTypeNumber;
|
||||
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
@NotBlank(message = "车辆类型名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String carTypeName;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,78 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.MaintainKnowledge;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 维保知识业务对象 maintain_knowledge
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MaintainKnowledge.class, reverseConvertGenerate = false)
|
||||
public class MaintainKnowledgeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 状态(0草稿1状态2已发布)
|
||||
*/
|
||||
@NotBlank(message = "状态(0草稿1状态2已发布)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 封面
|
||||
*/
|
||||
//@NotBlank(message = "封面不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String covers;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@NotBlank(message = "描述不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String depict;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@NotNull(message = "发布时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date releaseTime;
|
||||
|
||||
/**
|
||||
* 位置类型(0操作指引,1处理案例2常见问题)
|
||||
*/
|
||||
@NotBlank(message = "位置类型(0操作指引,1处理案例2常见问题)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -38,34 +38,37 @@ public class ResidentPersonBo extends BaseEntity {
|
||||
*/
|
||||
@NotBlank(message = "联系电话不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
*/
|
||||
@NotBlank(message = "人员类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String type;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@NotNull(message = "性别不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long gender;
|
||||
|
||||
/**
|
||||
* 权限组
|
||||
*/
|
||||
@NotNull(message = "权限组不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long authGroupId;
|
||||
|
||||
/**
|
||||
* 证件号
|
||||
*/
|
||||
@NotBlank(message = "证件号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 权限组
|
||||
*/
|
||||
private Long authGroupId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date begDate;
|
||||
private Date authBegDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endDate;
|
||||
private Date authEndDate;
|
||||
|
||||
/**
|
||||
* e8平台id
|
||||
|
@@ -69,6 +69,21 @@ public class ResidentUnitBo extends BaseEntity {
|
||||
@NotNull(message = "入驻时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date time;
|
||||
|
||||
/**
|
||||
* 权限组
|
||||
*/
|
||||
private Long authGroupId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date authBegDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date authEndDate;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@@ -81,12 +96,6 @@ public class ResidentUnitBo extends BaseEntity {
|
||||
// @NotNull(message = "员工人数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long number=0L;
|
||||
|
||||
/**
|
||||
* 权限组
|
||||
*/
|
||||
@NotNull(message = "权限组不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long authGroupId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
@@ -0,0 +1,135 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.CapitalApplication;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 资产申请视图对象 capital_application
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = CapitalApplication.class)
|
||||
public class CapitalApplicationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
private Long depotId;
|
||||
/**
|
||||
* 申请人id
|
||||
*/
|
||||
@ExcelProperty(value = "申请人id")
|
||||
private Long applicat;
|
||||
|
||||
|
||||
/**
|
||||
* 申请人名称
|
||||
*/
|
||||
@ExcelProperty(value = "申请人名称")
|
||||
private String applicatName;
|
||||
|
||||
/**
|
||||
* 申请人手机号
|
||||
*/
|
||||
@ExcelProperty(value = "申请人手机号")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
@ExcelProperty(value = "供应商id")
|
||||
private Long supplier;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@ExcelProperty(value = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
|
||||
/**
|
||||
* 采购方式
|
||||
*/
|
||||
@ExcelProperty(value = "采购方式")
|
||||
private String buyType;
|
||||
|
||||
/**
|
||||
* 采购单价
|
||||
*/
|
||||
@ExcelProperty(value = "采购单价")
|
||||
private BigDecimal buyUnitPrice;
|
||||
|
||||
/**
|
||||
* 采购金额
|
||||
*/
|
||||
@ExcelProperty(value = "采购金额")
|
||||
private BigDecimal buyAmount;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private String state;
|
||||
/**
|
||||
* 审核人意见
|
||||
*/
|
||||
private String auditOpinion;
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private Long audit;
|
||||
/**
|
||||
* 审核人名称
|
||||
*/
|
||||
private String auditName;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@ExcelProperty(value = "申请时间")
|
||||
private Date applicationTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,93 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.property.domain.CapitalInfo;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 资产信息视图对象 capital_info
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = CapitalInfo.class)
|
||||
public class CapitalInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ExcelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 资产名称
|
||||
*/
|
||||
@ExcelProperty(value = "资产名称")
|
||||
private String capitalName;
|
||||
|
||||
/**
|
||||
* 资产类型
|
||||
*/
|
||||
@ExcelProperty(value = "资产类型")
|
||||
private String capitalType;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@ExcelProperty(value = "规格")
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 资产申请id
|
||||
*/
|
||||
@ExcelProperty(value = "资产申请id")
|
||||
private Long capitalApplicationId;
|
||||
|
||||
/**
|
||||
* 购买数量
|
||||
*/
|
||||
@ExcelProperty(value = "购买数量")
|
||||
private Integer buyQuantity;
|
||||
|
||||
/**
|
||||
* 采购单价
|
||||
*/
|
||||
@ExcelProperty(value = "采购单价")
|
||||
private BigDecimal buyUnitPrice;
|
||||
|
||||
/**
|
||||
* 金额小计
|
||||
*/
|
||||
@ExcelProperty(value = "金额小计")
|
||||
private BigDecimal buyAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,94 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.CarInfo;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆信息视图对象 car_info
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = CarInfo.class)
|
||||
public class CarInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
@ExcelProperty(value = "车牌号")
|
||||
private String carNumber;
|
||||
|
||||
/**
|
||||
* 车架号
|
||||
*/
|
||||
@ExcelProperty(value = "车架号")
|
||||
private String carFrameNumber;
|
||||
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
@ExcelProperty(value = "车辆颜色")
|
||||
private String carColour;
|
||||
|
||||
/**
|
||||
* 品牌型号
|
||||
*/
|
||||
@ExcelProperty(value = "品牌型号")
|
||||
private String carBrand;
|
||||
|
||||
/**
|
||||
* 车辆类型id
|
||||
*/
|
||||
@ExcelProperty(value = "车辆类型id")
|
||||
private Long carTypeId;
|
||||
|
||||
/**
|
||||
* 登记日期
|
||||
*/
|
||||
@ExcelProperty(value = "登记日期")
|
||||
private Date carRecordDates;
|
||||
|
||||
/**
|
||||
* 预计停留
|
||||
*/
|
||||
@ExcelProperty(value = "预计停留")
|
||||
private Integer plannedStay;
|
||||
|
||||
/**
|
||||
* 车主
|
||||
*/
|
||||
@ExcelProperty(value = "车主")
|
||||
private Long carOwners;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.CarType;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆类型视图对象 car_type
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = CarType.class)
|
||||
public class CarTypeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 车辆类型编码
|
||||
*/
|
||||
@ExcelProperty(value = "车辆类型编码")
|
||||
private String carTypeNumber;
|
||||
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
@ExcelProperty(value = "车辆类型名称")
|
||||
private String carTypeName;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
@ExcelProperty(value = "说明")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.MaintainKnowledge;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 维保知识视图对象 maintain_knowledge
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MaintainKnowledge.class)
|
||||
public class MaintainKnowledgeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 状态(0草稿1状态2已发布)
|
||||
*/
|
||||
@ExcelProperty(value = "状态(0草稿1状态2已发布)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 封面
|
||||
*/
|
||||
@ExcelProperty(value = "封面")
|
||||
private String covers;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ExcelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ExcelProperty(value = "描述")
|
||||
private String depict;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@ExcelProperty(value = "发布时间")
|
||||
private Date releaseTime;
|
||||
|
||||
/**
|
||||
* 位置类型(0操作指引,1处理案例2常见问题)
|
||||
*/
|
||||
@ExcelProperty(value = "位置类型(0操作指引,1处理案例2常见问题)")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -43,7 +43,10 @@ public class ResidentPersonVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "用户名称")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 人员类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@@ -113,5 +116,27 @@ public class ResidentPersonVo implements Serializable {
|
||||
@ExcelProperty(value = "权限组id")
|
||||
private Long authGroupId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
private Date authBegDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
private Date authEndDate;
|
||||
|
||||
/**
|
||||
* e8平台id
|
||||
*/
|
||||
private Long eEightId;
|
||||
|
||||
/**
|
||||
* 证件号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -109,4 +109,16 @@ public class ResidentUnitVo implements Serializable {
|
||||
@ExcelProperty(value = "权限组id")
|
||||
private Long authGroupId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
private Date authBegDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
private Date authEndDate;
|
||||
|
||||
}
|
||||
|
@@ -34,6 +34,10 @@ public class ServiceWorkOrderAnalysisVo {
|
||||
public static class BarChartVo {
|
||||
private String month; // 月份,如 "2025-02"
|
||||
private int orderCount; // 工单数量
|
||||
public BarChartVo(String month, int orderCount) {
|
||||
this.month = month;
|
||||
this.orderCount = orderCount;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 满意度图表数据对象
|
||||
@@ -44,6 +48,13 @@ public class ServiceWorkOrderAnalysisVo {
|
||||
private String name; // 满意度名称:如“满意”
|
||||
private Long value; // 数量
|
||||
private Double rate; // 占比(百分比)
|
||||
|
||||
public SatisfactionChartVo(String name, Long value,Double rate) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.rate = rate;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,10 +64,12 @@ public class ServiceWorkOrderAnalysisVo {
|
||||
@Accessors(chain = true)
|
||||
public static class PieChartVo {
|
||||
private String type; // 工单类型
|
||||
private Long quantity; // 工单数量
|
||||
private double percentage; // 占比
|
||||
private Integer quantity; // 工单数量
|
||||
|
||||
public PieChartVo(String type, Integer quantity) {
|
||||
this.type = type;
|
||||
this.quantity = quantity;
|
||||
|
||||
public PieChartVo(String string, Long count, double percentage) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,54 @@
|
||||
package org.dromara.property.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.property.api.RemoteResidentPersonService;
|
||||
import org.dromara.property.api.domain.vo.RemoteResidentPersonVo;
|
||||
import org.dromara.property.domain.bo.ResidentPersonBo;
|
||||
import org.dromara.property.domain.vo.ResidentPersonVo;
|
||||
import org.dromara.property.service.IResidentPersonService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote RemoteResidentPersonServiceImpl
|
||||
* @since 2025/7/26
|
||||
*/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
@RequiredArgsConstructor
|
||||
public class RemoteResidentPersonServiceImpl implements RemoteResidentPersonService {
|
||||
|
||||
private final IResidentPersonService residentPersonService;
|
||||
|
||||
// 查询已上传图片,未授权人员
|
||||
@Override
|
||||
public List<RemoteResidentPersonVo> queryUnAuthPerson() {
|
||||
List<ResidentPersonVo> listVo = residentPersonService.queryUnAuthPerson();
|
||||
|
||||
return listVo.stream().map(vo -> {
|
||||
RemoteResidentPersonVo remoteResidentPersonVo = new RemoteResidentPersonVo();
|
||||
remoteResidentPersonVo.setId(vo.getId());
|
||||
remoteResidentPersonVo.setOssId(vo.getImg());
|
||||
remoteResidentPersonVo.setName(vo.getUserName());
|
||||
remoteResidentPersonVo.setIdCard(vo.getIdCard());
|
||||
remoteResidentPersonVo.setGender(vo.getGender());
|
||||
remoteResidentPersonVo.setAuthGroupId(vo.getAuthGroupId());
|
||||
remoteResidentPersonVo.setAuthBegDate(vo.getAuthBegDate());
|
||||
remoteResidentPersonVo.setAuthEndDate(vo.getAuthEndDate());
|
||||
return remoteResidentPersonVo;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
// 更新E8平台id
|
||||
@Override
|
||||
public Boolean updateE8Id(Long personId, Long e8Id) {
|
||||
ResidentPersonBo bo = new ResidentPersonBo();
|
||||
bo.setId(personId);
|
||||
bo.setEEightId(e8Id);
|
||||
return residentPersonService.updateByBo(bo);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.CapitalApplication;
|
||||
import org.dromara.property.domain.vo.CapitalApplicationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 资产申请Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface CapitalApplicationMapper extends BaseMapperPlus<CapitalApplication, CapitalApplicationVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.CapitalInfo;
|
||||
import org.dromara.property.domain.vo.CapitalInfoVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 资产信息Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Mapper
|
||||
public interface CapitalInfoMapper extends BaseMapperPlus<CapitalInfo, CapitalInfoVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.CarInfo;
|
||||
import org.dromara.property.domain.vo.CarInfoVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆信息Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
public interface CarInfoMapper extends BaseMapperPlus<CarInfo, CarInfoVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.CarType;
|
||||
import org.dromara.property.domain.vo.CarTypeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆类型Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
public interface CarTypeMapper extends BaseMapperPlus<CarType, CarTypeVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.MaintainKnowledge;
|
||||
import org.dromara.property.domain.vo.MaintainKnowledgeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 维保知识Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface MaintainKnowledgeMapper extends BaseMapperPlus<MaintainKnowledge, MaintainKnowledgeVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.CapitalApplication;
|
||||
import org.dromara.property.domain.vo.CapitalApplicationVo;
|
||||
import org.dromara.property.domain.bo.CapitalApplicationBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资产申请Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
public interface ICapitalApplicationService {
|
||||
|
||||
/**
|
||||
* 查询资产申请
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 资产申请
|
||||
*/
|
||||
CapitalApplicationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询资产申请列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 资产申请分页列表
|
||||
*/
|
||||
TableDataInfo<CapitalApplicationVo> queryPageList(CapitalApplicationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的资产申请列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 资产申请列表
|
||||
*/
|
||||
List<CapitalApplicationVo> queryList(CapitalApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 新增资产申请
|
||||
*
|
||||
* @param bo 资产申请
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(CapitalApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 修改资产申请
|
||||
*
|
||||
* @param bo 资产申请
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(CapitalApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除资产申请信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.CarInfo;
|
||||
import org.dromara.property.domain.vo.CarInfoVo;
|
||||
import org.dromara.property.domain.bo.CarInfoBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆信息Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
public interface ICarInfoService {
|
||||
|
||||
/**
|
||||
* 查询车辆管理-车辆信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 车辆管理-车辆信息
|
||||
*/
|
||||
CarInfoVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询车辆管理-车辆信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 车辆管理-车辆信息分页列表
|
||||
*/
|
||||
TableDataInfo<CarInfoVo> queryPageList(CarInfoBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的车辆管理-车辆信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 车辆管理-车辆信息列表
|
||||
*/
|
||||
List<CarInfoVo> queryList(CarInfoBo bo);
|
||||
|
||||
/**
|
||||
* 新增车辆管理-车辆信息
|
||||
*
|
||||
* @param bo 车辆管理-车辆信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(CarInfoBo bo);
|
||||
|
||||
/**
|
||||
* 修改车辆管理-车辆信息
|
||||
*
|
||||
* @param bo 车辆管理-车辆信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(CarInfoBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除车辆管理-车辆信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.CarType;
|
||||
import org.dromara.property.domain.vo.CarTypeVo;
|
||||
import org.dromara.property.domain.bo.CarTypeBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆类型Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
public interface ICarTypeService {
|
||||
|
||||
/**
|
||||
* 查询车辆管理-车辆类型
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 车辆管理-车辆类型
|
||||
*/
|
||||
CarTypeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询车辆管理-车辆类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 车辆管理-车辆类型分页列表
|
||||
*/
|
||||
TableDataInfo<CarTypeVo> queryPageList(CarTypeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的车辆管理-车辆类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 车辆管理-车辆类型列表
|
||||
*/
|
||||
List<CarTypeVo> queryList(CarTypeBo bo);
|
||||
|
||||
/**
|
||||
* 新增车辆管理-车辆类型
|
||||
*
|
||||
* @param bo 车辆管理-车辆类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(CarTypeBo bo);
|
||||
|
||||
/**
|
||||
* 修改车辆管理-车辆类型
|
||||
*
|
||||
* @param bo 车辆管理-车辆类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(CarTypeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除车辆管理-车辆类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.MaintainKnowledge;
|
||||
import org.dromara.property.domain.vo.MaintainKnowledgeVo;
|
||||
import org.dromara.property.domain.bo.MaintainKnowledgeBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 维保知识Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
public interface IMaintainKnowledgeService {
|
||||
|
||||
/**
|
||||
* 查询维保知识
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 维保知识
|
||||
*/
|
||||
MaintainKnowledgeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询维保知识列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 维保知识分页列表
|
||||
*/
|
||||
TableDataInfo<MaintainKnowledgeVo> queryPageList(MaintainKnowledgeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的维保知识列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 维保知识列表
|
||||
*/
|
||||
List<MaintainKnowledgeVo> queryList(MaintainKnowledgeBo bo);
|
||||
|
||||
/**
|
||||
* 新增维保知识
|
||||
*
|
||||
* @param bo 维保知识
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MaintainKnowledgeBo bo);
|
||||
|
||||
/**
|
||||
* 修改维保知识
|
||||
*
|
||||
* @param bo 维保知识
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(MaintainKnowledgeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除维保知识信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -1,6 +1,5 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.ResidentPerson;
|
||||
import org.dromara.property.domain.vo.ResidentPersonVo;
|
||||
import org.dromara.property.domain.bo.ResidentPersonBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -13,7 +12,7 @@ import java.util.List;
|
||||
* 入驻员工Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-19
|
||||
* @since 2025-06-19
|
||||
*/
|
||||
public interface IResidentPersonService {
|
||||
|
||||
@@ -69,8 +68,16 @@ public interface IResidentPersonService {
|
||||
|
||||
/**
|
||||
* 获取单位人员数量
|
||||
* @param unitId
|
||||
* @return
|
||||
*
|
||||
* @param unitId 单元id
|
||||
* @return Long
|
||||
*/
|
||||
Long queryPersonCount(Long unitId);
|
||||
|
||||
/**
|
||||
* 查询已上传图片,未授权人员
|
||||
*
|
||||
* @return List<ResidentPersonVo>
|
||||
*/
|
||||
List<ResidentPersonVo> queryUnAuthPerson();
|
||||
}
|
||||
|
@@ -0,0 +1,247 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.*;
|
||||
import org.dromara.property.domain.vo.CostItemsVo;
|
||||
import org.dromara.property.mapper.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.CapitalApplicationBo;
|
||||
import org.dromara.property.domain.vo.CapitalApplicationVo;
|
||||
import org.dromara.property.service.ICapitalApplicationService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 资产申请Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class CapitalApplicationServiceImpl implements ICapitalApplicationService {
|
||||
|
||||
private final CapitalApplicationMapper baseMapper;
|
||||
private final CapitalInfoMapper capitalMapper;
|
||||
private final AssetMapper assetsMapper;
|
||||
private final DepotLogMapper depotLogMapper;
|
||||
private final SuppliersMapper supplierMapper;
|
||||
private final ResidentPersonMapper residentPersonMapper;
|
||||
|
||||
/**
|
||||
* 查询资产申请
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 资产申请
|
||||
*/
|
||||
@Override
|
||||
public CapitalApplicationVo queryById(Long id) {
|
||||
CapitalApplicationVo capitalApplicationVo = baseMapper.selectVoById(id);
|
||||
List<Suppliers> suppliersList = supplierMapper.selectList();
|
||||
List<ResidentPerson> residentPeopleList = residentPersonMapper.selectList();
|
||||
assembly(suppliersList, residentPeopleList,capitalApplicationVo);
|
||||
return capitalApplicationVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询资产申请列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 资产申请分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<CapitalApplicationVo> queryPageList(CapitalApplicationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<CapitalApplication> lqw = buildQueryWrapper(bo);
|
||||
Page<CapitalApplicationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
if (CollUtil.isNotEmpty(result.getRecords())) {
|
||||
List<Suppliers> suppliersList = supplierMapper.selectList();
|
||||
List<ResidentPerson> residentPeopleList = residentPersonMapper.selectList();
|
||||
result.getRecords().stream().forEach(s -> {
|
||||
assembly(suppliersList, residentPeopleList,s);
|
||||
}
|
||||
);
|
||||
}
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装数据
|
||||
*/
|
||||
private void assembly(List<Suppliers> suppliersList,List<ResidentPerson> residentPeopleList,CapitalApplicationVo capitalApplicationVo) {
|
||||
if (CollUtil.isNotEmpty(suppliersList)) {
|
||||
Suppliers suppliers = suppliersList.stream()
|
||||
.filter(vo -> vo.getId() != null && vo.getId().equals(capitalApplicationVo.getSupplier())).findFirst().orElse(null);
|
||||
capitalApplicationVo.setSupplierName(suppliers.getSuppliersName());
|
||||
}
|
||||
if (CollUtil.isNotEmpty(residentPeopleList)) {
|
||||
ResidentPerson residentPerson = residentPeopleList.stream()
|
||||
.filter(vo -> vo.getId() != null && vo.getId().equals(capitalApplicationVo.getApplicat())).findFirst().orElse(null);
|
||||
capitalApplicationVo.setApplicatName(residentPerson.getUserName());
|
||||
ResidentPerson residentPersons = residentPeopleList.stream()
|
||||
.filter(vo -> vo.getId() != null && vo.getId().equals(capitalApplicationVo.getAudit())).findFirst().orElse(null);
|
||||
capitalApplicationVo.setAuditName(residentPersons.getUserName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的资产申请列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 资产申请列表
|
||||
*/
|
||||
@Override
|
||||
public List<CapitalApplicationVo> queryList(CapitalApplicationBo bo) {
|
||||
LambdaQueryWrapper<CapitalApplication> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CapitalApplication> buildQueryWrapper(CapitalApplicationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<CapitalApplication> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(CapitalApplication::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), CapitalApplication::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getApplicat() != null, CapitalApplication::getApplicat, bo.getApplicat());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), CapitalApplication::getPhone, bo.getPhone());
|
||||
lqw.eq(bo.getSupplier() != null, CapitalApplication::getSupplier, bo.getSupplier());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBuyType()), CapitalApplication::getBuyType, bo.getBuyType());
|
||||
lqw.eq(bo.getBuyUnitPrice() != null, CapitalApplication::getBuyUnitPrice, bo.getBuyUnitPrice());
|
||||
lqw.eq(bo.getBuyAmount() != null, CapitalApplication::getBuyAmount, bo.getBuyAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getState()), CapitalApplication::getState, bo.getState());
|
||||
lqw.eq(bo.getApplicationTime() != null, CapitalApplication::getApplicationTime, bo.getApplicationTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), CapitalApplication::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产申请
|
||||
*
|
||||
* @param bo 资产申请
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(CapitalApplicationBo bo) {
|
||||
CapitalApplication add = MapstructUtils.convert(bo, CapitalApplication.class);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
bo.getCapitalInfoBolist().stream().forEach(s -> {
|
||||
s.setCapitalApplicationId(add.getId());
|
||||
CapitalInfo capitalInfo = MapstructUtils.convert(s, CapitalInfo.class);
|
||||
capitalMapper.insert(capitalInfo);
|
||||
//validCapitalInfoBefore(add,capitalInfo);
|
||||
validEntityBeforeSave(add);
|
||||
});
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产申请
|
||||
*
|
||||
* @param bo 资产申请
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(CapitalApplicationBo bo) {
|
||||
CapitalApplication update = MapstructUtils.convert(bo, CapitalApplication.class);
|
||||
validEntityBeforeUpdate(update);
|
||||
bo.getCapitalInfoBolist().stream().forEach(s -> {
|
||||
CapitalInfo capitalInfo = MapstructUtils.convert(s, CapitalInfo.class);
|
||||
capitalMapper.deleteById(capitalInfo);
|
||||
capitalMapper.insert(capitalInfo);
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
CapitalApplication capitalApplication = baseMapper.selectById(bo.getId());
|
||||
if (bo.getState().equals("1") && !bo.getState().equals(capitalApplication.getState())) {
|
||||
validCapitalInfoBefore(update, capitalInfo);
|
||||
}
|
||||
});
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验资产类型和仓库
|
||||
*/
|
||||
private void validCapitalInfoBefore(CapitalApplication capitalApplication, CapitalInfo capitalInfo) {
|
||||
LambdaQueryWrapper<Asset> assetQueryWrapper = new LambdaQueryWrapper<>();
|
||||
assetQueryWrapper.eq(Asset::getModel, capitalInfo.getCapitalType());
|
||||
assetQueryWrapper.eq(Asset::getName, capitalInfo.getCapitalName());
|
||||
assetQueryWrapper.eq(Asset::getSpecs, capitalInfo.getSpec());
|
||||
List<Asset> assets = assetsMapper.selectList(assetQueryWrapper);
|
||||
if (assets.isEmpty()) {
|
||||
Asset asset = new Asset();
|
||||
asset.setModel(capitalInfo.getCapitalType());
|
||||
asset.setName(capitalInfo.getCapitalName());
|
||||
asset.setSpecs(capitalInfo.getSpec());
|
||||
asset.setSpecs(capitalInfo.getSpec());
|
||||
asset.setPrice(capitalInfo.getBuyUnitPrice().longValue());
|
||||
asset.setSuppliersId(capitalApplication.getSupplier());
|
||||
asset.setStorageTime(new Date());
|
||||
asset.setType(0L);
|
||||
assetsMapper.insert(asset);
|
||||
} else {
|
||||
// 如果查询到多个结果,默认使用第一个
|
||||
Asset asset = assets.get(0);
|
||||
LambdaQueryWrapper<DepotLog> depotLogWrapper = new LambdaQueryWrapper<>();
|
||||
depotLogWrapper.eq(DepotLog::getAssetId, asset.getId());
|
||||
depotLogWrapper.eq(DepotLog::getDepotId, asset.getDepotId());
|
||||
if (!depotLogMapper.exists(depotLogWrapper)) {
|
||||
DepotLog depotLog = new DepotLog();
|
||||
depotLog.setAssetId(asset.getId());
|
||||
depotLog.setDepotId(capitalApplication.getDepotId());
|
||||
depotLogMapper.insert(depotLog);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(CapitalApplication entity) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeUpdate(CapitalApplication entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除资产申请信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
ids.forEach(s -> {
|
||||
LambdaQueryWrapper<CapitalInfo> objectLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
objectLambdaQueryWrapper.eq(CapitalInfo::getCapitalApplicationId, s);
|
||||
capitalMapper.delete(objectLambdaQueryWrapper);
|
||||
});
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,139 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.CarInfoBo;
|
||||
import org.dromara.property.domain.vo.CarInfoVo;
|
||||
import org.dromara.property.domain.CarInfo;
|
||||
import org.dromara.property.mapper.CarInfoMapper;
|
||||
import org.dromara.property.service.ICarInfoService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆信息Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class CarInfoServiceImpl implements ICarInfoService {
|
||||
|
||||
private final CarInfoMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询车辆管理-车辆信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 车辆管理-车辆信息
|
||||
*/
|
||||
@Override
|
||||
public CarInfoVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询车辆管理-车辆信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 车辆管理-车辆信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<CarInfoVo> queryPageList(CarInfoBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<CarInfo> lqw = buildQueryWrapper(bo);
|
||||
Page<CarInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的车辆管理-车辆信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 车辆管理-车辆信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<CarInfoVo> queryList(CarInfoBo bo) {
|
||||
LambdaQueryWrapper<CarInfo> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CarInfo> buildQueryWrapper(CarInfoBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<CarInfo> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(CarInfo::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCarNumber()), CarInfo::getCarNumber, bo.getCarNumber());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCarFrameNumber()), CarInfo::getCarFrameNumber, bo.getCarFrameNumber());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCarColour()), CarInfo::getCarColour, bo.getCarColour());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCarBrand()), CarInfo::getCarBrand, bo.getCarBrand());
|
||||
lqw.eq(bo.getCarTypeId() != null, CarInfo::getCarTypeId, bo.getCarTypeId());
|
||||
lqw.eq(bo.getCarRecordDates() != null, CarInfo::getCarRecordDates, bo.getCarRecordDates());
|
||||
lqw.eq(bo.getPlannedStay() != null, CarInfo::getPlannedStay, bo.getPlannedStay());
|
||||
lqw.eq(bo.getCarOwners() != null, CarInfo::getCarOwners, bo.getCarOwners());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆管理-车辆信息
|
||||
*
|
||||
* @param bo 车辆管理-车辆信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(CarInfoBo bo) {
|
||||
CarInfo add = MapstructUtils.convert(bo, CarInfo.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆管理-车辆信息
|
||||
*
|
||||
* @param bo 车辆管理-车辆信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(CarInfoBo bo) {
|
||||
CarInfo update = MapstructUtils.convert(bo, CarInfo.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(CarInfo entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除车辆管理-车辆信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,133 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.CarTypeBo;
|
||||
import org.dromara.property.domain.vo.CarTypeVo;
|
||||
import org.dromara.property.domain.CarType;
|
||||
import org.dromara.property.mapper.CarTypeMapper;
|
||||
import org.dromara.property.service.ICarTypeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 车辆管理-车辆类型Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-26
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class CarTypeServiceImpl implements ICarTypeService {
|
||||
|
||||
private final CarTypeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询车辆管理-车辆类型
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 车辆管理-车辆类型
|
||||
*/
|
||||
@Override
|
||||
public CarTypeVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询车辆管理-车辆类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 车辆管理-车辆类型分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<CarTypeVo> queryPageList(CarTypeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<CarType> lqw = buildQueryWrapper(bo);
|
||||
Page<CarTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的车辆管理-车辆类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 车辆管理-车辆类型列表
|
||||
*/
|
||||
@Override
|
||||
public List<CarTypeVo> queryList(CarTypeBo bo) {
|
||||
LambdaQueryWrapper<CarType> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CarType> buildQueryWrapper(CarTypeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<CarType> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(CarType::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCarTypeNumber()), CarType::getCarTypeNumber, bo.getCarTypeNumber());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCarTypeName()), CarType::getCarTypeName, bo.getCarTypeName());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆管理-车辆类型
|
||||
*
|
||||
* @param bo 车辆管理-车辆类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(CarTypeBo bo) {
|
||||
CarType add = MapstructUtils.convert(bo, CarType.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆管理-车辆类型
|
||||
*
|
||||
* @param bo 车辆管理-车辆类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(CarTypeBo bo) {
|
||||
CarType update = MapstructUtils.convert(bo, CarType.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(CarType entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除车辆管理-车辆类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,139 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.MaintainKnowledgeBo;
|
||||
import org.dromara.property.domain.vo.MaintainKnowledgeVo;
|
||||
import org.dromara.property.domain.MaintainKnowledge;
|
||||
import org.dromara.property.mapper.MaintainKnowledgeMapper;
|
||||
import org.dromara.property.service.IMaintainKnowledgeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 维保知识Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MaintainKnowledgeServiceImpl implements IMaintainKnowledgeService {
|
||||
|
||||
private final MaintainKnowledgeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询维保知识
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 维保知识
|
||||
*/
|
||||
@Override
|
||||
public MaintainKnowledgeVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询维保知识列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 维保知识分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MaintainKnowledgeVo> queryPageList(MaintainKnowledgeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MaintainKnowledge> lqw = buildQueryWrapper(bo);
|
||||
Page<MaintainKnowledgeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的维保知识列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 维保知识列表
|
||||
*/
|
||||
@Override
|
||||
public List<MaintainKnowledgeVo> queryList(MaintainKnowledgeBo bo) {
|
||||
LambdaQueryWrapper<MaintainKnowledge> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MaintainKnowledge> buildQueryWrapper(MaintainKnowledgeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MaintainKnowledge> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MaintainKnowledge::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), MaintainKnowledge::getTitle, bo.getTitle());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), MaintainKnowledge::getStatus, bo.getStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCovers()), MaintainKnowledge::getCovers, bo.getCovers());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContent()), MaintainKnowledge::getContent, bo.getContent());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDepict()), MaintainKnowledge::getDepict, bo.getDepict());
|
||||
lqw.eq(bo.getReleaseTime() != null, MaintainKnowledge::getReleaseTime, bo.getReleaseTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getType()), MaintainKnowledge::getType, bo.getType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), MaintainKnowledge::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增维保知识
|
||||
*
|
||||
* @param bo 维保知识
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MaintainKnowledgeBo bo) {
|
||||
MaintainKnowledge add = MapstructUtils.convert(bo, MaintainKnowledge.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改维保知识
|
||||
*
|
||||
* @param bo 维保知识
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MaintainKnowledgeBo bo) {
|
||||
MaintainKnowledge update = MapstructUtils.convert(bo, MaintainKnowledge.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MaintainKnowledge entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除维保知识信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -1,7 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@@ -10,10 +9,13 @@ import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.vo.ResidentUnitVo;
|
||||
import org.dromara.property.service.IResidentUnitService;
|
||||
import org.dromara.sis.api.RemoteSisAuth;
|
||||
import org.dromara.sis.api.domain.RemotePersonAuth;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.ResidentPersonBo;
|
||||
import org.dromara.property.domain.vo.ResidentPersonVo;
|
||||
@@ -22,6 +24,7 @@ import org.dromara.property.mapper.ResidentPersonMapper;
|
||||
import org.dromara.property.service.IResidentPersonService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
@@ -30,14 +33,18 @@ import java.util.Collection;
|
||||
* 入驻员工Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-19
|
||||
* @since 2025-06-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
|
||||
private final ResidentPersonMapper baseMapper;
|
||||
@Resource
|
||||
private ResidentPersonMapper baseMapper;
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IResidentUnitService residentUnitService;
|
||||
|
||||
@DubboReference
|
||||
private RemoteSisAuth remoteSisAuth;
|
||||
@@ -108,7 +115,13 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
ResidentPerson add = MapstructUtils.convert(bo, ResidentPerson.class);
|
||||
Assert.notNull(add, "数据处理失败");
|
||||
// 唯一性校验
|
||||
assert add != null;
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
// 首次入驻新用户权限组默认使用公司权限
|
||||
ResidentUnitVo ruVo = residentUnitService.queryById(bo.getUnitId());
|
||||
add.setAuthGroupId(ruVo.getAuthGroupId());
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
Assert.isTrue(flag, "员工入驻失败!");
|
||||
if (flag) {
|
||||
@@ -116,21 +129,20 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
RemotePersonAuth personAuth = new RemotePersonAuth();
|
||||
personAuth.setId(add.getId());
|
||||
personAuth.setName(bo.getUserName());
|
||||
personAuth.setSex(bo.getGender() != 1L ? 0 : 1);
|
||||
personAuth.setSex(bo.getGender().intValue());
|
||||
personAuth.setPhone(bo.getPhone());
|
||||
personAuth.setEmail(bo.getEmail());
|
||||
personAuth.setIdCardNumber(bo.getIdCard());
|
||||
personAuth.setOssId(bo.getImg());
|
||||
personAuth.setCarNumber(bo.getCarNumber());
|
||||
personAuth.setBegDate(bo.getBegDate());
|
||||
personAuth.setEndDate(bo.getEndDate());
|
||||
personAuth.setAuthGroupId(bo.getAuthGroupId());
|
||||
|
||||
Long personId = remoteSisAuth.personAuth(personAuth);
|
||||
Assert.notNull(personId, "新增授权记录失败");
|
||||
bo.setId(add.getId());
|
||||
bo.setEEightId(personId);
|
||||
this.updateByBo(bo);
|
||||
// 使用公司权限组
|
||||
personAuth.setAuthBegDate(ruVo.getAuthBegDate());
|
||||
personAuth.setAuthEndDate(ruVo.getAuthEndDate());
|
||||
personAuth.setAuthGroupId(ruVo.getAuthGroupId());
|
||||
|
||||
Boolean auth = remoteSisAuth.personAuth(personAuth);
|
||||
Assert.isTrue(auth, "新增授权记录失败");
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@@ -177,7 +189,17 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
LambdaQueryWrapper<ResidentPerson> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.eq(ResidentPerson::getId, ids);
|
||||
List<ResidentPersonVo> list = baseMapper.selectVoList(lqw);
|
||||
|
||||
boolean hasEnabled = list.stream()
|
||||
.anyMatch(vo -> vo.getState() == 1); // 遇到第一个启用人员立即返回
|
||||
Assert.isTrue(!hasEnabled, "当前存在人员状态为启用,请核对后再试!");
|
||||
|
||||
boolean hasE8 = list.stream()
|
||||
.anyMatch(vo -> vo.getEEightId() != null); // 遇到第一个e8人员立即返回
|
||||
Assert.isTrue(!hasE8, "当前存在人员已下发权限,请删除通行权限后再试!");
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
@@ -185,8 +207,8 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
/**
|
||||
* 获取单位人员数量
|
||||
*
|
||||
* @param unitId
|
||||
* @return
|
||||
* @param unitId 单位id
|
||||
* @return Long
|
||||
*/
|
||||
@Override
|
||||
public Long queryPersonCount(Long unitId) {
|
||||
@@ -194,4 +216,18 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
lqw.eq(unitId != null, ResidentPerson::getUnitId, unitId);
|
||||
return baseMapper.selectCount(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已上传图片,未授权人员
|
||||
*
|
||||
* @return List<ResidentPersonVo>
|
||||
*/
|
||||
@Override
|
||||
public List<ResidentPersonVo> queryUnAuthPerson(){
|
||||
LambdaQueryWrapper<ResidentPerson> lqw = Wrappers.lambdaQuery();
|
||||
lqw.isNotNull(ResidentPerson::getImg)
|
||||
.ne(ResidentPerson::getImg, "")
|
||||
.isNull(ResidentPerson::getEEightId);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
}
|
||||
|
@@ -363,10 +363,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
default -> "未知";
|
||||
};
|
||||
|
||||
satisfactionRateList.add(new ServiceWorkOrderAnalysisVo.SatisfactionChartVo()
|
||||
.setName(name)
|
||||
.setValue((long) count)
|
||||
.setRate(rate));
|
||||
satisfactionRateList.add(new ServiceWorkOrderAnalysisVo.SatisfactionChartVo(name,count,rate));
|
||||
}
|
||||
|
||||
return satisfactionRateList;
|
||||
@@ -404,6 +401,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
|
||||
} catch (Exception e) {
|
||||
// 忽略格式错误的日期
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,24 +429,24 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
Map<Long, Long> workOrderTypeCounts = serviceWorkOrdersList.stream()
|
||||
.collect(Collectors.groupingBy(ServiceWorkOrders::getType, Collectors.counting()));
|
||||
|
||||
long total = serviceWorkOrdersList.size();
|
||||
List<ServiceWorkOrderAnalysisVo.PieChartVo> result = new ArrayList<>();
|
||||
|
||||
for (Map.Entry<Long, Long> entry : workOrderTypeCounts.entrySet()) {
|
||||
Long typeId = entry.getKey();
|
||||
Long count = entry.getValue();
|
||||
Integer count = entry.getValue().intValue();
|
||||
|
||||
// 查询类型名称
|
||||
ServiceWorkOrdersType serviceWorkOrdersType = serviceWorkOrdersTypeMapper.selectById(typeId);
|
||||
String typeName = serviceWorkOrdersType != null ? serviceWorkOrdersType.getOrderTypeName() : "未知类型";
|
||||
// 计算占比(保留两位小数)
|
||||
double percentage = Math.round(((double) count / total) * 10000) / 100.0;
|
||||
result.add(new ServiceWorkOrderAnalysisVo.PieChartVo(typeName.toString(), count, percentage));
|
||||
String type = serviceWorkOrdersType != null ? serviceWorkOrdersType.getOrderTypeName() : "未知类型";
|
||||
|
||||
// 添加到结果中
|
||||
result.add(new ServiceWorkOrderAnalysisVo.PieChartVo(type, count));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
private List<ServiceWorkOrderAnalysisVo.BarChartVo> getRecentSixMonthsWorkOrders(List<ServiceWorkOrders> ordersList) {
|
||||
LocalDate today = LocalDate.now();
|
||||
|
||||
// 获取近6个月的日期范围(含当月)
|
||||
List<String> months = new ArrayList<>();
|
||||
for (int i = 5; i >= 0; i--) {
|
||||
@@ -463,10 +461,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
|
||||
// 构建柱状图数据
|
||||
return months.stream()
|
||||
.map(month -> new ServiceWorkOrderAnalysisVo.BarChartVo()
|
||||
.setMonth(month)
|
||||
.setOrderCount(Math.toIntExact(orderCountMap.getOrDefault(month, 0L)))
|
||||
)
|
||||
.map(month -> new ServiceWorkOrderAnalysisVo.BarChartVo(month,Math.toIntExact(orderCountMap.getOrDefault(month, 0L))))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user