Merge remote-tracking branch 'origin/master'
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:
@@ -62,7 +62,7 @@ public class ApplicationController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:application:query")
|
||||
//@SaCheckPermission("property:application:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<ApplicationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
@@ -90,7 +90,13 @@ public class ApplicationController extends BaseController {
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ApplicationBo bo) {
|
||||
return toAjax(applicationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核通过
|
||||
*/
|
||||
@PostMapping("/verified")
|
||||
public R<Void> verified(@Validated(EditGroup.class) @RequestBody ApplicationBo bo) {
|
||||
return toAjax(applicationService.verifiedByBo(bo));
|
||||
}
|
||||
/**
|
||||
* 删除资产领用
|
||||
*
|
||||
|
@@ -40,7 +40,7 @@ public class DepotLogController extends BaseController {
|
||||
/**
|
||||
* 查询仓库记录列表
|
||||
*/
|
||||
@SaCheckPermission("property:log:list")
|
||||
//@SaCheckPermission("property:log:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<DepotLogVo> list(DepotLogBo bo, PageQuery pageQuery) {
|
||||
return depotLogService.queryPageList(bo, pageQuery);
|
||||
@@ -62,7 +62,7 @@ public class DepotLogController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:log:query")
|
||||
// @SaCheckPermission("property:log:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DepotLogVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
|
@@ -42,12 +42,12 @@ public class Application extends TenantEntity {
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Long number;
|
||||
private Integer number;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long state;
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 审批人id
|
||||
|
@@ -4,6 +4,8 @@ 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;
|
||||
|
||||
@@ -47,7 +49,7 @@ public class Asset extends TenantEntity {
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 库存
|
||||
|
@@ -45,7 +45,7 @@ public class Depot extends TenantEntity {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long state;
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
|
@@ -4,6 +4,8 @@ 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;
|
||||
|
||||
@@ -42,7 +44,7 @@ public class DepotLog extends TenantEntity {
|
||||
/**
|
||||
* 流转类型
|
||||
*/
|
||||
private Long type;
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 流转时间
|
||||
@@ -57,7 +59,7 @@ public class DepotLog extends TenantEntity {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long state;
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
@@ -67,17 +69,17 @@ public class DepotLog extends TenantEntity {
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
private Long priceSum;
|
||||
private BigDecimal priceSum;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Long number;
|
||||
private Integer number;
|
||||
|
||||
/**
|
||||
* 供应商id
|
||||
|
@@ -0,0 +1,58 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 巡检点签到记录对象 inspection_point_record
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-08-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("inspection_point_record")
|
||||
public class InspectionPointRecord extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 签到人id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 签到时间
|
||||
*/
|
||||
private Date signTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,63 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 巡检路线巡检点关联对象 inspection_route_point
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-08-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("inspection_route_point")
|
||||
public class InspectionRoutePoint extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检路线id
|
||||
*/
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -41,12 +41,12 @@ public class ApplicationBo extends BaseEntity {
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Long number;
|
||||
private Integer number;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long state;
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 审批人id
|
||||
|
@@ -8,6 +8,8 @@ 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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@@ -46,12 +48,12 @@ public class AssetBo extends BaseEntity {
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 库存
|
||||
*/
|
||||
private Long stock;
|
||||
private Integer stock;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
@@ -81,7 +83,7 @@ public class AssetBo extends BaseEntity {
|
||||
/**
|
||||
* 固定资产类型
|
||||
*/
|
||||
private Long type;
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ public class AssetTypeBo extends BaseEntity {
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sort;
|
||||
private Integer sort;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -90,6 +90,8 @@ public class CleanOrderBo extends BaseEntity {
|
||||
@NotBlank(message = "结束时间不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String endTime;
|
||||
|
||||
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
@@ -102,6 +104,11 @@ public class CleanOrderBo extends BaseEntity {
|
||||
* 图片
|
||||
*/
|
||||
private String imgUrl;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
@NotNull(message = "单位id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long unitId;
|
||||
|
||||
// /**
|
||||
|
@@ -8,6 +8,8 @@ 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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@@ -66,12 +68,12 @@ public class DepotLogBo extends BaseEntity {
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
private Long priceSum;
|
||||
private BigDecimal priceSum;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
|
@@ -0,0 +1,60 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.InspectionPointRecord;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 巡检点签到记录业务对象 inspection_point_record
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-08-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = InspectionPointRecord.class, reverseConvertGenerate = false)
|
||||
public class InspectionPointRecordBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
@NotNull(message = "巡检点id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 签到人id
|
||||
*/
|
||||
@NotNull(message = "签到人id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 签到时间
|
||||
*/
|
||||
@NotNull(message = "签到时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date signTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -9,6 +9,8 @@ import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.property.domain.InspectionRoute;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检路线业务对象 inspection_route
|
||||
*
|
||||
@@ -41,4 +43,9 @@ public class InspectionRouteBo extends BaseEntity {
|
||||
*/
|
||||
@NotNull(message = "排序不能为空", groups = { EditGroup.class })
|
||||
private Integer sort;
|
||||
/**
|
||||
* 巡检路线巡检点关联
|
||||
*/
|
||||
@NotEmpty(message = "巡检点不能为空", groups = { EditGroup.class })
|
||||
List <InspectionRoutePointBo> inspectionRoutePointBoList;
|
||||
}
|
||||
|
@@ -0,0 +1,66 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.InspectionRoutePoint;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 巡检路线巡检点关联业务对象 inspection_route_point
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-08-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = InspectionRoutePoint.class, reverseConvertGenerate = false)
|
||||
public class InspectionRoutePointBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检路线id
|
||||
*/
|
||||
// @NotNull(message = "巡检路线id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
@NotNull(message = "巡检点id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -64,13 +64,13 @@ public class ApplicationVo implements Serializable {
|
||||
* 数量
|
||||
*/
|
||||
@ExcelProperty(value = "数量")
|
||||
private Long number;
|
||||
private Integer number;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private Long state;
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 审批人id
|
||||
|
@@ -44,7 +44,7 @@ public class AssetTypeVo implements Serializable {
|
||||
* 排序
|
||||
*/
|
||||
@ExcelProperty(value = "排序")
|
||||
private Long sort;
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
@@ -1,5 +1,6 @@
|
||||
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.Asset;
|
||||
@@ -64,7 +65,7 @@ public class AssetVo implements Serializable {
|
||||
* 价格
|
||||
*/
|
||||
@ExcelProperty(value = "价格")
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 库存
|
||||
|
@@ -1,5 +1,6 @@
|
||||
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.DepotLog;
|
||||
@@ -41,18 +42,28 @@ public class DepotLogVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "仓库id")
|
||||
private Long depotId;
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
@ExcelProperty(value = "仓库名称")
|
||||
private String depotName;
|
||||
|
||||
/**
|
||||
* 资产id
|
||||
*/
|
||||
@ExcelProperty(value = "资产id")
|
||||
private Long assetId;
|
||||
/**
|
||||
* 资产名称
|
||||
*/
|
||||
@ExcelProperty(value = "资产名称")
|
||||
private String assetName;
|
||||
|
||||
/**
|
||||
* 流转类型
|
||||
*/
|
||||
@ExcelProperty(value = "流转类型")
|
||||
private Long type;
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 流转时间
|
||||
@@ -64,13 +75,17 @@ public class DepotLogVo implements Serializable {
|
||||
* 操作人id
|
||||
*/
|
||||
@ExcelProperty(value = "操作人id")
|
||||
private Long userId;
|
||||
private Long userId; /**
|
||||
* 操作人id
|
||||
*/
|
||||
@ExcelProperty(value = "操作人名称")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private Long state;
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
@@ -82,25 +97,30 @@ public class DepotLogVo implements Serializable {
|
||||
* 价格
|
||||
*/
|
||||
@ExcelProperty(value = "价格")
|
||||
private Long price;
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ExcelProperty(value = "总价")
|
||||
private Long priceSum;
|
||||
private BigDecimal priceSum;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@ExcelProperty(value = "数量")
|
||||
private Long number;
|
||||
private Integer number;
|
||||
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
@ExcelProperty(value = "供应商id")
|
||||
private Long supplierId;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@ExcelProperty(value = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
@@ -56,7 +56,7 @@ public class DepotVo implements Serializable {
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private Long state;
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
@@ -0,0 +1,70 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.InspectionPointRecord;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 巡检点签到记录视图对象 inspection_point_record
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-08-04
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionPointRecord.class)
|
||||
public class InspectionPointRecordVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点id")
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 签到人id
|
||||
*/
|
||||
@ExcelProperty(value = "签到人id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 签到时间
|
||||
*/
|
||||
@ExcelProperty(value = "签到时间")
|
||||
private Date signTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,76 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.InspectionRoutePoint;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 巡检路线巡检点关联视图对象 inspection_route_point
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-08-04
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionRoutePoint.class)
|
||||
public class InspectionRoutePointVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检路线id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检路线id")
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点id")
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.InspectionPointRecord;
|
||||
import org.dromara.property.domain.vo.InspectionPointRecordVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 巡检点签到记录Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-08-04
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionPointRecordMapper extends BaseMapperPlus<InspectionPointRecord, InspectionPointRecordVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.InspectionRoutePoint;
|
||||
import org.dromara.property.domain.vo.InspectionRoutePointVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 巡检路线巡检点关联Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-08-04
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionRoutePointMapper extends BaseMapperPlus<InspectionRoutePoint, InspectionRoutePointVo> {
|
||||
|
||||
}
|
@@ -66,4 +66,11 @@ public interface IApplicationService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 审核通过
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
Boolean verifiedByBo(ApplicationBo bo);
|
||||
}
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
@@ -11,9 +13,12 @@ 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.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.property.domain.Asset;
|
||||
import org.dromara.property.domain.DepotLog;
|
||||
import org.dromara.property.domain.vo.AssetVo;
|
||||
import org.dromara.property.mapper.AssetMapper;
|
||||
import org.dromara.property.mapper.DepotLogMapper;
|
||||
import org.dromara.system.api.RemoteUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.ApplicationBo;
|
||||
@@ -21,12 +26,11 @@ import org.dromara.property.domain.vo.ApplicationVo;
|
||||
import org.dromara.property.domain.Application;
|
||||
import org.dromara.property.mapper.ApplicationMapper;
|
||||
import org.dromara.property.service.IApplicationService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 资产领用Service业务层处理
|
||||
@@ -42,6 +46,7 @@ public class ApplicationServiceImpl implements IApplicationService {
|
||||
private final ApplicationMapper baseMapper;
|
||||
private final AssetMapper assetMapper;
|
||||
private final RemoteUserService remoteUserService;
|
||||
private final DepotLogMapper depotLogMapper;
|
||||
|
||||
/**
|
||||
* 查询资产领用
|
||||
@@ -50,12 +55,14 @@ public class ApplicationServiceImpl implements IApplicationService {
|
||||
* @return 资产领用
|
||||
*/
|
||||
@Override
|
||||
public ApplicationVo queryById(Long id){
|
||||
public ApplicationVo queryById(Long id) {
|
||||
ApplicationVo applicationVo = baseMapper.selectVoById(id);
|
||||
applicationVo.setUserName(remoteUserService.selectUserNameById(applicationVo.getUserId()));
|
||||
applicationVo.setAcceptanceUserName(remoteUserService.selectUserNameById(applicationVo.getAcceptanceUserId()));
|
||||
if (ObjectUtil.isNotEmpty(applicationVo.getAcceptanceUserId())) {
|
||||
applicationVo.setAcceptanceUserName(remoteUserService.selectUserNameById(applicationVo.getAcceptanceUserId()));
|
||||
}
|
||||
AssetVo assetVo = assetMapper.selectVoById(applicationVo.getAssetId());
|
||||
applicationVo.setAssetName(assetVo==null?"资产不存在" : assetVo.getName());
|
||||
applicationVo.setAssetName(assetVo == null ? "资产不存在" : assetVo.getName());
|
||||
return applicationVo;
|
||||
}
|
||||
|
||||
@@ -70,21 +77,41 @@ public class ApplicationServiceImpl implements IApplicationService {
|
||||
public TableDataInfo<ApplicationVo> queryPageList(ApplicationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<Application> lqw = buildQueryWrapper(bo);
|
||||
Page<ApplicationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
result.getRecords().forEach(r -> ids.add(r.getUserId()));
|
||||
result.getRecords().forEach(r -> ids.add(r.getAcceptanceUserId()));
|
||||
Map<Long, String> userNamesByIds = remoteUserService.selectUserNamesByIds(ids);
|
||||
result.getRecords().forEach(r ->r.setUserName(userNamesByIds.get(r.getUserId())));
|
||||
result.getRecords().forEach(r ->r.setAcceptanceUserName(userNamesByIds.get(r.getUserId())));
|
||||
// result.getRecords().forEach(r -> r.setUserName(remoteUserService.selectUserNameById(r.getUserId())));
|
||||
// result.getRecords().forEach(r -> r.setAcceptanceUserName(remoteUserService.selectUserNameById(r.getAcceptanceUserId())));
|
||||
|
||||
// 收集用户ID用于批量查询用户名
|
||||
Set<Long> userIds = new HashSet<>();
|
||||
result.getRecords().forEach(r -> {
|
||||
if (r.getUserId() != null) {
|
||||
userIds.add(r.getUserId());
|
||||
}
|
||||
if (r.getAcceptanceUserId() != null) {
|
||||
userIds.add(r.getAcceptanceUserId());
|
||||
}
|
||||
});
|
||||
|
||||
// 批量获取用户名
|
||||
Map<Long, String> userNamesByIds = remoteUserService.selectUserNamesByIds(new ArrayList<>(userIds));
|
||||
|
||||
// 设置用户名(添加空值检查)
|
||||
result.getRecords().forEach(r -> {
|
||||
if (r.getUserId() != null) {
|
||||
r.setUserName(userNamesByIds.get(r.getUserId()));
|
||||
}
|
||||
if (r.getAcceptanceUserId() != null) {
|
||||
r.setAcceptanceUserName(userNamesByIds.get(r.getAcceptanceUserId()));
|
||||
}
|
||||
});
|
||||
|
||||
// 设置资产名称
|
||||
result.getRecords().forEach(r -> {
|
||||
AssetVo assetVo = assetMapper.selectVoById(r.getAssetId());
|
||||
r.setAssetName(assetVo==null?"资产不存在" : assetVo.getName());
|
||||
r.setAssetName(assetVo == null ? "资产不存在" : assetVo.getName());
|
||||
});
|
||||
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询符合条件的资产领用列表
|
||||
*
|
||||
@@ -99,7 +126,7 @@ public class ApplicationServiceImpl implements IApplicationService {
|
||||
applicationVos.forEach(r -> r.setAcceptanceUserName(remoteUserService.selectUserNameById(r.getAcceptanceUserId())));
|
||||
applicationVos.forEach(r -> {
|
||||
AssetVo assetVo = assetMapper.selectVoById(r.getAssetId());
|
||||
r.setAssetName(assetVo==null?"资产不存在" : assetVo.getName());
|
||||
r.setAssetName(assetVo == null ? "资产不存在" : assetVo.getName());
|
||||
});
|
||||
return applicationVos;
|
||||
}
|
||||
@@ -140,20 +167,17 @@ public class ApplicationServiceImpl implements IApplicationService {
|
||||
*
|
||||
* @param bo 资产领用
|
||||
* @return 是否修改成功
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ApplicationBo bo) {
|
||||
Application update = MapstructUtils.convert(bo, Application.class);
|
||||
validEntityBeforeSave(update);
|
||||
boolean b = baseMapper.updateById(update) > 0;
|
||||
if (b&&bo.getState()==1){
|
||||
if (b && bo.getState() == 1) {
|
||||
Asset asset = assetMapper.selectById(bo.getAssetId());
|
||||
if (asset.getStock()>=update.getNumber()) {
|
||||
if (asset.getStock() >= update.getNumber()) {
|
||||
UpdateWrapper<Asset> assetUpdateWrapper = new UpdateWrapper<>();
|
||||
assetUpdateWrapper.eq("id",bo.getAssetId())
|
||||
.set("stock",assetMapper.selectVoById(bo.getAssetId()).getStock()-update.getNumber());
|
||||
assetUpdateWrapper.eq("id", bo.getAssetId())
|
||||
.set("stock", assetMapper.selectVoById(bo.getAssetId()).getStock() - update.getNumber());
|
||||
assetMapper.update(assetUpdateWrapper);
|
||||
}
|
||||
|
||||
@@ -164,8 +188,9 @@ public class ApplicationServiceImpl implements IApplicationService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(Application entity){
|
||||
private void validEntityBeforeSave(Application entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
entity.setApplicationTime(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,9 +202,47 @@ public class ApplicationServiceImpl implements IApplicationService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核通过
|
||||
*
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean verifiedByBo(ApplicationBo bo) {
|
||||
Application update = MapstructUtils.convert(bo, Application.class);
|
||||
if (bo.getState().equals(1)) {
|
||||
//查询领用资产
|
||||
Asset asset = assetMapper.selectById(bo.getAssetId());
|
||||
Assert.isTrue(ObjectUtil.isNotNull(asset), "领用资产不存在");
|
||||
BigDecimal stock = new BigDecimal(asset.getStock());
|
||||
BigDecimal number = new BigDecimal(bo.getNumber());
|
||||
BigDecimal remain = stock.subtract(number);
|
||||
Assert.isTrue(remain.compareTo(BigDecimal.ZERO) >= 0, "库存不足无法领用");
|
||||
asset.setStock(Long.valueOf(String.valueOf(remain)));
|
||||
boolean b = assetMapper.updateById(asset) > 0;
|
||||
if (b) {
|
||||
DepotLog depotLog = new DepotLog();
|
||||
depotLog.setDepotId(asset.getDepotId());
|
||||
depotLog.setAssetId(asset.getId());
|
||||
depotLog.setType(1);
|
||||
depotLog.setTime(new Date());
|
||||
depotLog.setUserId(LoginHelper.getUserId());
|
||||
depotLog.setPrice(asset.getPrice());
|
||||
depotLog.setNumber(bo.getNumber());
|
||||
depotLog.setPriceSum((asset.getPrice().multiply(new BigDecimal(bo.getNumber()))));
|
||||
depotLog.setSupplierId(asset.getSuppliersId());
|
||||
depotLogMapper.insert(depotLog);
|
||||
}
|
||||
}
|
||||
boolean flag = baseMapper.updateById(update) > 0;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
@@ -119,7 +119,11 @@ public class AssetServiceImpl implements IAssetService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getModel()), Asset::getModel, bo.getModel());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecs()), Asset::getSpecs, bo.getSpecs());
|
||||
lqw.eq(bo.getPrice() != null, Asset::getPrice, bo.getPrice());
|
||||
lqw.eq(bo.getStock() != null, Asset::getStock, bo.getStock());
|
||||
if(params.containsKey("stock")){
|
||||
lqw.gt(Asset::getStock, 0);
|
||||
}else {
|
||||
lqw.eq(bo.getStock() != null, Asset::getStock, bo.getStock());
|
||||
}
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), Asset::getUnit, bo.getUnit());
|
||||
lqw.eq(bo.getDepotId() != null, Asset::getDepotId, bo.getDepotId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMsg()), Asset::getMsg, bo.getMsg());
|
||||
|
@@ -196,7 +196,7 @@ public class CapitalApplicationServiceImpl implements ICapitalApplicationService
|
||||
asset.setName(capitalInfo.getCapitalName());
|
||||
asset.setSpecs(capitalInfo.getSpec());
|
||||
asset.setSpecs(capitalInfo.getSpec());
|
||||
asset.setPrice(capitalInfo.getBuyUnitPrice().longValue());
|
||||
asset.setPrice(capitalInfo.getBuyUnitPrice());
|
||||
asset.setSuppliersId(capitalApplication.getSupplier());
|
||||
asset.setStorageTime(new Date());
|
||||
asset.setType(0L);
|
||||
@@ -221,6 +221,7 @@ public class CapitalApplicationServiceImpl implements ICapitalApplicationService
|
||||
*/
|
||||
private void validEntityBeforeSave(CapitalApplication entity) {
|
||||
entity.setState("0");
|
||||
entity.setApplicationTime(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -9,6 +11,11 @@ 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.Asset;
|
||||
import org.dromara.property.domain.Depot;
|
||||
import org.dromara.property.mapper.AssetMapper;
|
||||
import org.dromara.property.mapper.DepotMapper;
|
||||
import org.dromara.system.api.RemoteUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.DepotLogBo;
|
||||
import org.dromara.property.domain.vo.DepotLogVo;
|
||||
@@ -16,9 +23,8 @@ import org.dromara.property.domain.DepotLog;
|
||||
import org.dromara.property.mapper.DepotLogMapper;
|
||||
import org.dromara.property.service.IDepotLogService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 仓库记录Service业务层处理
|
||||
@@ -32,6 +38,9 @@ import java.util.Collection;
|
||||
public class DepotLogServiceImpl implements IDepotLogService {
|
||||
|
||||
private final DepotLogMapper baseMapper;
|
||||
private final AssetMapper assetsMapper;
|
||||
private final DepotMapper depotMapper;
|
||||
private final RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 查询仓库记录
|
||||
@@ -40,8 +49,10 @@ public class DepotLogServiceImpl implements IDepotLogService {
|
||||
* @return 仓库记录
|
||||
*/
|
||||
@Override
|
||||
public DepotLogVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
public DepotLogVo queryById(Long id) {
|
||||
DepotLogVo depotLogVo = baseMapper.selectVoById(id);
|
||||
handleData(depotLogVo,null,null,null);
|
||||
return depotLogVo;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,6 +66,41 @@ public class DepotLogServiceImpl implements IDepotLogService {
|
||||
public TableDataInfo<DepotLogVo> queryPageList(DepotLogBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DepotLog> lqw = buildQueryWrapper(bo);
|
||||
Page<DepotLogVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
// 收集用户ID用于批量查询用户名
|
||||
Set<Long> userIds = new HashSet<>();
|
||||
Set<Long> assetIds = new HashSet<>();
|
||||
Set<Long> depotIds = new HashSet<>();
|
||||
result.getRecords().forEach(r -> {
|
||||
if (r.getUserId() != null) {
|
||||
userIds.add(r.getUserId());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(r.getAssetId())) {
|
||||
assetIds.add(r.getAssetId());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(r.getDepotId())) {
|
||||
depotIds.add(r.getDepotId());
|
||||
}
|
||||
});
|
||||
|
||||
// 批量获取用户名
|
||||
Map<Long, String> userNamesByIds = remoteUserService.selectUserNamesByIds(new ArrayList<>(userIds));
|
||||
//批量获取资产名
|
||||
Map<Long, String> assetNamesByIds = assetsMapper.selectList(
|
||||
new LambdaQueryWrapper<Asset>()
|
||||
.select(Asset::getId, Asset::getName)
|
||||
.in(Asset::getId, assetIds)
|
||||
).stream()
|
||||
.collect(Collectors.toMap(Asset::getId, Asset::getName));
|
||||
//批量获取厂库名
|
||||
Map<Long, String> depotNamesByIds = depotMapper.selectList(
|
||||
new LambdaQueryWrapper<Depot>()
|
||||
.select(Depot::getId, Depot::getDepotName)
|
||||
.in(Depot::getId, depotIds)
|
||||
).stream()
|
||||
.collect(Collectors.toMap(Depot::getId, Depot::getDepotName));
|
||||
result.getRecords().stream().forEach(s -> {
|
||||
handleData(s, userNamesByIds, assetNamesByIds, depotNamesByIds);
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -87,6 +133,33 @@ public class DepotLogServiceImpl implements IDepotLogService {
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
*/
|
||||
private void handleData(DepotLogVo depotLogVo, Map<Long, String> userNamesByIds, Map<Long, String> assetNamesByIds, Map<Long, String> depotNamesByIds) {
|
||||
//批量获取资产名
|
||||
if(CollUtil.isEmpty(assetNamesByIds)){
|
||||
assetNamesByIds = assetsMapper.selectList(
|
||||
new LambdaQueryWrapper<Asset>()
|
||||
.select(Asset::getId, Asset::getName)
|
||||
).stream()
|
||||
.collect(Collectors.toMap(Asset::getId, Asset::getName));
|
||||
}
|
||||
|
||||
//批量获取厂库名
|
||||
if(CollUtil.isEmpty(depotNamesByIds)){
|
||||
depotNamesByIds = depotMapper.selectList(
|
||||
new LambdaQueryWrapper<Depot>()
|
||||
.select(Depot::getId, Depot::getDepotName)
|
||||
).stream()
|
||||
.collect(Collectors.toMap(Depot::getId, Depot::getDepotName));
|
||||
}
|
||||
|
||||
depotLogVo.setAssetName(CollUtil.isNotEmpty(assetNamesByIds)?assetNamesByIds.get(depotLogVo.getAssetId()):null);
|
||||
depotLogVo.setDepotName(CollUtil.isNotEmpty(depotNamesByIds)?depotNamesByIds.get(depotLogVo.getDepotName()):null);
|
||||
depotLogVo.setUserName(CollUtil.isNotEmpty(userNamesByIds)?userNamesByIds.get(depotLogVo.getUserId()):remoteUserService.selectNicknameById(depotLogVo.getUserId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仓库记录
|
||||
*
|
||||
@@ -120,7 +193,7 @@ public class DepotLogServiceImpl implements IDepotLogService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(DepotLog entity){
|
||||
private void validEntityBeforeSave(DepotLog entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@@ -133,7 +206,7 @@ public class DepotLogServiceImpl implements IDepotLogService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
|
@@ -10,9 +10,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.InspectionRoute;
|
||||
import org.dromara.property.domain.InspectionRoutePoint;
|
||||
import org.dromara.property.domain.bo.InspectionRouteBo;
|
||||
import org.dromara.property.domain.vo.InspectionRouteVo;
|
||||
import org.dromara.property.mapper.InspectionRouteMapper;
|
||||
import org.dromara.property.mapper.InspectionRoutePointMapper;
|
||||
import org.dromara.property.service.IInspectionRouteService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -20,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 巡检路线Service业务层处理
|
||||
@@ -33,6 +36,7 @@ import java.util.Collection;
|
||||
public class InspectionRouteServiceImpl implements IInspectionRouteService {
|
||||
|
||||
private final InspectionRouteMapper baseMapper;
|
||||
private final InspectionRoutePointMapper routePointMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检路线
|
||||
@@ -94,6 +98,14 @@ public class InspectionRouteServiceImpl implements IInspectionRouteService {
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
List<InspectionRoutePoint> routePointList = bo.getInspectionRoutePointBoList().stream()
|
||||
.map(pointBo -> {
|
||||
InspectionRoutePoint point = MapstructUtils.convert(pointBo, InspectionRoutePoint.class);
|
||||
point.setRouteId(add.getId());
|
||||
return point;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
routePointMapper.insertBatch(routePointList);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
@@ -174,6 +174,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
||||
lqw.eq(bo.getCompleTime() != null, ServiceWorkOrders::getCompleTime, bo.getCompleTime());
|
||||
lqw.eq(Objects.nonNull(bo.getServiceEvalua()), ServiceWorkOrders::getServiceEvalua, bo.getServiceEvalua());
|
||||
lqw.eq(Objects.nonNull(bo.getType()), ServiceWorkOrders::getType, bo.getType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProcessingWeight()), ServiceWorkOrders::getProcessingWeight, bo.getProcessingWeight());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), ServiceWorkOrders::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
Reference in New Issue
Block a user