New file |
| | |
| | | package com.by4cloud.platformx.api.feign; |
| | | |
| | | import com.by4cloud.platformx.common.core.constant.ServiceNameConstants; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName RemoteDeptService.java |
| | | * @Description TODO |
| | | * @createTime 2025年03月12日 14:12:00 |
| | | */ |
| | | @FeignClient(contextId = "remoteDeptService", value = ServiceNameConstants.UPMS_SERVICE,url="${servers.main-url}") |
| | | public interface RemoteDeptService { |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.api.feign; |
| | | |
| | | import com.by4cloud.platformx.common.core.constant.ServiceNameConstants; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName RemoteUserService.java |
| | | * @Description TODO |
| | | * @createTime 2025年03月12日 13:42:00 |
| | | */ |
| | | @FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.UPMS_SERVICE,url="${servers.main-url}") |
| | | public interface RemoteUserService { |
| | | |
| | | } |
| | |
| | | port: 8888 # 项目端口 |
| | | servlet: |
| | | context-path: /device # 项目访问路径 |
| | | servers: |
| | | main-url: http://127.0.0.1:9999/admin |
| | | |
| | | spring: |
| | | application: |
| | |
| | | <groupId>com.by4cloud</groupId> |
| | | <artifactId>platformx-common-data</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.by4cloud</groupId> |
| | | <artifactId>platformx-upms-api</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-extra</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
New file |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Table; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import javax.persistence.Transient; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName Contract.java |
| | | * @Description TODO |
| | | * @createTime 2025年03月13日 09:07:00 |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @TableName("contract") |
| | | @javax.persistence.Table(name = "contract") |
| | | @Table(appliesTo = "contract", comment = "合同表") |
| | | public class Contract extends BaseModel<Contract> { |
| | | |
| | | @Schema(description = "名称") |
| | | @Column(columnDefinition="VARCHAR(200) comment '名称'") |
| | | private String name; |
| | | @Schema(description = "编号") |
| | | @Column(columnDefinition="VARCHAR(200) comment '编号'") |
| | | private String number; |
| | | |
| | | @Schema(description = "甲方") |
| | | @Column(columnDefinition="VARCHAR(50) comment '甲方'") |
| | | private String partya; |
| | | |
| | | @Schema(description = "乙方") |
| | | @Column(columnDefinition="VARCHAR(50) comment '乙方'") |
| | | private String partyb; |
| | | |
| | | @Schema(description = "三方") |
| | | @Column(columnDefinition="VARCHAR(50) comment '三方'") |
| | | private String partyc; |
| | | |
| | | /** |
| | | * 合同金额 |
| | | */ |
| | | @Column(columnDefinition="double comment '合同金额'") |
| | | private Double output; |
| | | |
| | | /** |
| | | * 总量 |
| | | */ |
| | | @Column(columnDefinition="double comment '总量'") |
| | | private Double countExecutive; |
| | | |
| | | /** |
| | | * 执行量 |
| | | */ |
| | | @Column(columnDefinition="double comment '执行量'") |
| | | private Double executive; |
| | | |
| | | /** |
| | | * 合同条款 |
| | | */ |
| | | @TableField(updateStrategy = FieldStrategy.NOT_NULL) |
| | | @Column(columnDefinition="varchar(500) comment '合同条款'") |
| | | private String content; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(updateStrategy = FieldStrategy.NOT_NULL) |
| | | @Column(columnDefinition="varchar(2000) comment '文件名称'") |
| | | private String fileName; |
| | | |
| | | @TableField(updateStrategy = FieldStrategy.NOT_NULL) |
| | | @Column(columnDefinition="varchar(2000) comment '文件地址'") |
| | | private String filePath; |
| | | |
| | | @Schema(description = "类型") |
| | | @Column(columnDefinition="int comment '类型 0租赁合同,1购买合同,2承租合同'") |
| | | private Integer type; |
| | | |
| | | @Schema(description = "状态") |
| | | @Column(columnDefinition="int comment '类型 0待审批,1已审批,2完结'") |
| | | private Integer status; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Schema(description = "填报时间") |
| | | @Column(columnDefinition = "datetime comment '填报时间'") |
| | | private Date releaseDate; |
| | | @Transient |
| | | @TableField(exist = false) |
| | | private List<ContractItem> contractItemList; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Table; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName ContractItem.java |
| | | * @Description TODO |
| | | * @createTime 2025年03月13日 09:42:00 |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @TableName("contract_item") |
| | | @javax.persistence.Table(name = "contract_item") |
| | | @Table(appliesTo = "contract_item", comment = "合同明细表") |
| | | public class ContractItem extends DeviceBaseModel<ContractItem> { |
| | | |
| | | /** |
| | | * 合同Id |
| | | */ |
| | | @Column(columnDefinition="long comment '合同Id'") |
| | | private Long contractId; |
| | | |
| | | @Schema(description = "设备ID") |
| | | @Column(columnDefinition="long comment '设备ID'") |
| | | private Long deviceId; |
| | | |
| | | |
| | | } |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import cn.hutool.extra.spring.SpringUtil; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.by4cloud.platformx.admin.api.utils.UpmsCacheUtil; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | |
| | | @TableName("device") |
| | | @javax.persistence.Table(name = "device") |
| | | @Table(appliesTo = "device", comment = "出租设备清单表") |
| | | public class Device extends DeviceBaseModel<Device>{ |
| | | public class Device extends BaseModel<Device> { |
| | | @Schema(description = "分类ID") |
| | | @Column(columnDefinition="long comment '分类ID'") |
| | | private Long classId; |
| | |
| | | @Column(columnDefinition="int comment '库存数'") |
| | | private Integer num; |
| | | |
| | | @Transient |
| | | @TableField(exist = false) |
| | | private String reqCompName; |
| | | @Column( |
| | | columnDefinition = "varchar(100) comment '名称'" |
| | | ) |
| | | private String name; |
| | | @Column( |
| | | columnDefinition = "varchar(200) comment '规格型号'" |
| | | ) |
| | | private String specification; |
| | | @Column( |
| | | columnDefinition = "int comment '到货月份'" |
| | | ) |
| | | private Integer month; |
| | | @Column( |
| | | columnDefinition = "varchar(20) comment '单位'" |
| | | ) |
| | | private String unit; |
| | | @Column( |
| | | columnDefinition = "double(10,2) comment '单价'" |
| | | ) |
| | | private Double price; |
| | | |
| | | } |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.extra.spring.SpringUtil; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.by4cloud.platformx.admin.api.utils.UpmsCacheUtil; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Id; |
| | | import javax.persistence.MappedSuperclass; |
| | | import javax.persistence.Transient; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | columnDefinition = "char(1) default '0'" |
| | | ) |
| | | private String delFlag = "0"; |
| | | @Schema( |
| | | description = "单位id" |
| | | ) |
| | | @TableField( |
| | | fill = FieldFill.INSERT |
| | | ) |
| | | private Long compId; |
| | | @Transient |
| | | @TableField( |
| | | exist = false |
| | | ) |
| | | @Schema( |
| | | description = "单位名称" |
| | | ) |
| | | private String compName; |
| | | @Column( |
| | | columnDefinition = "varchar(100) comment '名称'" |
| | | ) |
| | |
| | | columnDefinition = "double(10,2) comment '单价'" |
| | | ) |
| | | private Double price; |
| | | public String getCompName() { |
| | | if (StrUtil.isEmpty(this.compName)) { |
| | | UpmsCacheUtil upmsCacheUtil = (UpmsCacheUtil) SpringUtil.getBean(UpmsCacheUtil.class); |
| | | this.compName = upmsCacheUtil.getCompNameById(this.compId); |
| | | } |
| | | |
| | | return this.compName; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | |
| | | public void setPrice(Double price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public void setCompId(final Long compId) { |
| | | this.compId = compId; |
| | | } |
| | | public Long getCompId() { |
| | | return this.compId; |
| | | } |
| | | public void setCompName(final String compName) { |
| | | this.compName = compName; |
| | | } |
| | | public Double getAmount() { |
| | | return amount; |
| | | } |
| | |
| | | @Schema(description = "拟使用地点") |
| | | @Column(columnDefinition="VARCHAR(64) comment '拟使用地点'") |
| | | private String place; |
| | | @Schema(description = "使用公司") |
| | | @Column(columnDefinition="int comment '使用公司'") |
| | | private Integer compId; |
| | | @Schema(description = "申请部门") |
| | | @Column(columnDefinition="int comment '申请部门'") |
| | | private Integer deptId; |
| | |
| | | @Schema(description = "拟使用地点") |
| | | @Column(columnDefinition="VARCHAR(64) comment '拟使用地点'") |
| | | private String place; |
| | | @Schema(description = "使用公司") |
| | | @Column(columnDefinition="int comment '使用公司'") |
| | | private Integer compId; |
| | | @Schema(description = "申请部门") |
| | | @Column(columnDefinition="int comment '申请部门'") |
| | | private Integer deptId; |
New file |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Table; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName DeviceInventory.java |
| | | * @Description TODO |
| | | * @createTime 2025年03月13日 08:23:00 |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @TableName("device_inventory") |
| | | @javax.persistence.Table(name = "device_inventory") |
| | | @Table(appliesTo = "device_inventory", comment = "出租设备库存表") |
| | | public class DeviceInventory extends BaseModel<DeviceInventory> { |
| | | |
| | | @Schema(description = "设备编码") |
| | | @Column(columnDefinition="VARCHAR(64) comment '设备编码'") |
| | | private String deviceNumber; |
| | | |
| | | @Schema(description = "序列号") |
| | | @Column(columnDefinition="VARCHAR(64) comment '序列号'") |
| | | private String serialNo; |
| | | |
| | | @Schema(description = "设备ID") |
| | | @Column(columnDefinition="long comment '设备ID'") |
| | | private Long deviceId; |
| | | |
| | | @Column( |
| | | columnDefinition = "varchar(100) comment '名称'" |
| | | ) |
| | | private String name; |
| | | |
| | | @Schema(description = "来源") |
| | | @Column(columnDefinition="int comment '来源 0仓库 1购买 2子单位闲置'") |
| | | private Integer source; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Table; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName InventoryFlowWater.java |
| | | * @Description TODO |
| | | * @createTime 2025年03月13日 08:40:00 |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @TableName("inventory_flow_water") |
| | | @javax.persistence.Table(name = "inventory_flow_water") |
| | | @Table(appliesTo = "inventory_flow_water", comment = "库存流水表") |
| | | public class InventoryFlowWater extends BaseModel<InventoryFlowWater> { |
| | | |
| | | @Schema(description = "分类ID") |
| | | @Column(columnDefinition="long comment '分类ID'") |
| | | private Long classId; |
| | | |
| | | @Schema(description = "设备ID") |
| | | @Column(columnDefinition="long comment '设备ID'") |
| | | private Long deviceId; |
| | | |
| | | @Schema(description = "计划id") |
| | | @Column(columnDefinition="long comment '计划id'") |
| | | private Long planId; |
| | | |
| | | @Schema(description = "库存ID") |
| | | @Column(columnDefinition="long comment '库存ID'") |
| | | private Long inventoryId; |
| | | |
| | | @Schema(description = "数量") |
| | | @Column(columnDefinition="long comment '数量'") |
| | | private Long num; |
| | | |
| | | @Schema(description = "备注") |
| | | @Column(columnDefinition="VARCHAR(200) comment '备注'") |
| | | private String remark; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Table; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName ReceivingNote.java |
| | | * @Description TODO |
| | | * @createTime 2025年03月13日 09:51:00 |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @TableName("receiving_note") |
| | | @javax.persistence.Table(name = "receiving_note") |
| | | @Table(appliesTo = "receiving_note", comment = "验收表") |
| | | public class ReceivingNote extends BaseModel<ReceivingNote> { |
| | | /** |
| | | * 合同Id |
| | | */ |
| | | @Column(columnDefinition="long comment '合同Id'") |
| | | private Long contractId; |
| | | @Schema(description = "验收公司") |
| | | @Column(columnDefinition="VARCHAR(64) comment '验收公司'") |
| | | private String releaseCompName; |
| | | @Schema(description = "验收人") |
| | | @Column(columnDefinition="VARCHAR(64) comment '验收人'") |
| | | private String releasePerson; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Schema(description = "验收时间") |
| | | @Column(columnDefinition = "datetime comment '验收时间'") |
| | | private Date releaseDate; |
| | | @Schema(description = "总数") |
| | | @Column(columnDefinition="long comment '总数'") |
| | | private Long count; |
| | | /** |
| | | * 总金额 |
| | | */ |
| | | @Column(columnDefinition="double comment '总金额'") |
| | | private Double output; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Table; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName ReceivingNote.java |
| | | * @Description TODO |
| | | * @createTime 2025年03月13日 09:51:00 |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @TableName("receiving_note_item") |
| | | @javax.persistence.Table(name = "receiving_note_item") |
| | | @Table(appliesTo = "receiving_note_item", comment = "验收子项表") |
| | | public class ReceivingNoteItem extends BaseModel<ReceivingNoteItem> { |
| | | /** |
| | | * 验收主表Id |
| | | */ |
| | | @Column(columnDefinition="long comment '验收主表Id'") |
| | | private Long noteId; |
| | | /** |
| | | * 合同Id |
| | | */ |
| | | @Column(columnDefinition="long comment '合同子项Id'") |
| | | private Long contractItemId; |
| | | |
| | | @Schema(description = "数量") |
| | | @Column(columnDefinition="long comment '数量'") |
| | | private Long num; |
| | | /** |
| | | * 验收金额 |
| | | */ |
| | | @Column(columnDefinition="double comment '验收金额'") |
| | | private Double output; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.controller; |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.device.entity.Contract; |
| | | import com.by4cloud.platformx.device.service.ContractService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | | import org.springdoc.api.annotations.ParameterObject; |
| | | import org.springframework.http.HttpHeaders; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 合同表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 10:20:35 |
| | | */ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/contract" ) |
| | | @Tag(description = "contract" , name = "合同表管理" ) |
| | | @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) |
| | | public class ContractController { |
| | | |
| | | private final ContractService contractService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param contract 合同表 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/page" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_view')" ) |
| | | public R getContractPage(@ParameterObject Page page, @ParameterObject Contract contract) { |
| | | LambdaQueryWrapper<Contract> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(contractService.page(page, wrapper)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询合同表 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id查询" , description = "通过id查询" ) |
| | | @GetMapping("/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_view')" ) |
| | | public R getById(@PathVariable("id" ) Long id) { |
| | | return R.ok(contractService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增合同表 |
| | | * @param contract 合同表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增合同表" , description = "新增合同表" ) |
| | | @SysLog("新增合同表" ) |
| | | @PostMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_add')" ) |
| | | public R save(@RequestBody Contract contract) { |
| | | return R.ok(contractService.save(contract)); |
| | | } |
| | | |
| | | /** |
| | | * 修改合同表 |
| | | * @param contract 合同表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "修改合同表" , description = "修改合同表" ) |
| | | @SysLog("修改合同表" ) |
| | | @PutMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_edit')" ) |
| | | public R updateById(@RequestBody Contract contract) { |
| | | return R.ok(contractService.updateById(contract)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除合同表 |
| | | * @param ids id列表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id删除合同表" , description = "通过id删除合同表" ) |
| | | @SysLog("通过id删除合同表" ) |
| | | @DeleteMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_del')" ) |
| | | public R removeById(@RequestBody Long[] ids) { |
| | | return R.ok(contractService.removeBatchByIds(CollUtil.toList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出excel 表格 |
| | | * @param contract 查询条件 |
| | | * @param ids 导出指定ID |
| | | * @return excel 文件流 |
| | | */ |
| | | @ResponseExcel |
| | | @GetMapping("/export") |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_export')" ) |
| | | public List<Contract> export(Contract contract,Long[] ids) { |
| | | return contractService.list(Wrappers.lambdaQuery(contract).in(ArrayUtil.isNotEmpty(ids), Contract::getId, ids)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.controller; |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.device.entity.ContractItem; |
| | | import com.by4cloud.platformx.device.service.ContractItemService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | | import org.springdoc.api.annotations.ParameterObject; |
| | | import org.springframework.http.HttpHeaders; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 合同明细表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 10:48:44 |
| | | */ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/contractItem" ) |
| | | @Tag(description = "contractItem" , name = "合同明细表管理" ) |
| | | @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) |
| | | public class ContractItemController { |
| | | |
| | | private final ContractItemService contractItemService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param contractItem 合同明细表 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/page" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_contractItem_view')" ) |
| | | public R getContractItemPage(@ParameterObject Page page, @ParameterObject ContractItem contractItem) { |
| | | LambdaQueryWrapper<ContractItem> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(contractItemService.page(page, wrapper)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询合同明细表 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id查询" , description = "通过id查询" ) |
| | | @GetMapping("/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_contractItem_view')" ) |
| | | public R getById(@PathVariable("id" ) Long id) { |
| | | return R.ok(contractItemService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增合同明细表 |
| | | * @param contractItem 合同明细表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增合同明细表" , description = "新增合同明细表" ) |
| | | @SysLog("新增合同明细表" ) |
| | | @PostMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_contractItem_add')" ) |
| | | public R save(@RequestBody ContractItem contractItem) { |
| | | return R.ok(contractItemService.save(contractItem)); |
| | | } |
| | | |
| | | /** |
| | | * 修改合同明细表 |
| | | * @param contractItem 合同明细表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "修改合同明细表" , description = "修改合同明细表" ) |
| | | @SysLog("修改合同明细表" ) |
| | | @PutMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_contractItem_edit')" ) |
| | | public R updateById(@RequestBody ContractItem contractItem) { |
| | | return R.ok(contractItemService.updateById(contractItem)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除合同明细表 |
| | | * @param ids id列表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id删除合同明细表" , description = "通过id删除合同明细表" ) |
| | | @SysLog("通过id删除合同明细表" ) |
| | | @DeleteMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_contractItem_del')" ) |
| | | public R removeById(@RequestBody Long[] ids) { |
| | | return R.ok(contractItemService.removeBatchByIds(CollUtil.toList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出excel 表格 |
| | | * @param contractItem 查询条件 |
| | | * @param ids 导出指定ID |
| | | * @return excel 文件流 |
| | | */ |
| | | @ResponseExcel |
| | | @GetMapping("/export") |
| | | @PreAuthorize("@pms.hasPermission('platformx_contractItem_export')" ) |
| | | public List<ContractItem> export(ContractItem contractItem,Long[] ids) { |
| | | return contractItemService.list(Wrappers.lambdaQuery(contractItem).in(ArrayUtil.isNotEmpty(ids), ContractItem::getId, ids)); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.admin.api.entity.SysDeptRelation; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.common.security.util.SecurityUtils; |
| | | import com.by4cloud.platformx.device.entity.Device; |
| | | import com.by4cloud.platformx.device.service.DeviceService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | |
| | | /** |
| | | * 审批通过 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "审批通过" , description = "审批通过" ) |
| | | @GetMapping("/pass/{id}" ) |
| | | public R passById(@PathVariable("id" ) Long id) { |
| | | Device byId = deviceService.getById(id); |
| | | byId.setReqStatus(1); |
| | | deviceService.updateById(byId); |
| | | @PostMapping("/pass" ) |
| | | public R passById(@RequestBody Device device) { |
| | | device.setReqStatus(1); |
| | | deviceService.updateById(device); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | |
| | | @PostMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_device_add')" ) |
| | | public R save(@RequestBody Device device) { |
| | | if(device.getReqStatus() == 0){ |
| | | device.setReqCompId(SecurityUtils.getUser().getDeptId()); |
| | | } |
| | | return R.ok(deviceService.save(device)); |
| | | } |
| | | |
New file |
| | |
| | | package com.by4cloud.platformx.device.controller; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.device.entity.DeviceInventory; |
| | | import com.by4cloud.platformx.device.service.DeviceInventoryService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springdoc.api.annotations.ParameterObject; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 库存表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 10:22:39 |
| | | */ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/deviceInventory" ) |
| | | @Tag(description = "deviceInventory" , name = "库存表管理" ) |
| | | @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) |
| | | public class DeviceInventoryController { |
| | | |
| | | private final DeviceInventoryService DeviceInventoryService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param deviceInventory 库存表 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/page" ) |
| | | public R getDeviceInventoryPage(@ParameterObject Page page, @ParameterObject DeviceInventory deviceInventory) { |
| | | LambdaQueryWrapper<DeviceInventory> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(DeviceInventoryService.page(page, wrapper)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询库存流水表 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id查询" , description = "通过id查询" ) |
| | | @GetMapping("/{id}" ) |
| | | public R getById(@PathVariable("id" ) Long id) { |
| | | return R.ok(DeviceInventoryService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增库存流水表 |
| | | * @param DeviceInventory 库存表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增库存表" , description = "新增库存表" ) |
| | | @SysLog("新增库存流水表" ) |
| | | @PostMapping |
| | | public R save(@RequestBody DeviceInventory DeviceInventory) { |
| | | return R.ok(DeviceInventoryService.save(DeviceInventory)); |
| | | } |
| | | |
| | | /** |
| | | * 修改库存表 |
| | | * @param DeviceInventory 库存表 |
| | | * @return R |
| | | */ |
| | | @SysLog("修改库存表" ) |
| | | @PutMapping |
| | | public R updateById(@RequestBody DeviceInventory DeviceInventory) { |
| | | return R.ok(DeviceInventoryService.updateById(DeviceInventory)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除库存流水表 |
| | | * @param ids id列表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id删除库存表" , description = "通过id删除库存表" ) |
| | | @SysLog("通过id删除库存流水表" ) |
| | | @DeleteMapping |
| | | public R removeById(@RequestBody Long[] ids) { |
| | | return R.ok(DeviceInventoryService.removeBatchByIds(CollUtil.toList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出excel 表格 |
| | | * @param deviceInventory 查询条件 |
| | | * @param ids 导出指定ID |
| | | * @return excel 文件流 |
| | | */ |
| | | @ResponseExcel |
| | | @GetMapping("/export") |
| | | @PreAuthorize("@pms.hasPermission('platformx_DeviceInventory_export')" ) |
| | | public List<DeviceInventory> export(DeviceInventory deviceInventory,Long[] ids) { |
| | | return DeviceInventoryService.list(Wrappers.lambdaQuery(deviceInventory).in(ArrayUtil.isNotEmpty(ids), DeviceInventory::getId, ids)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.controller; |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.device.entity.InventoryFlowWater; |
| | | import com.by4cloud.platformx.device.service.InventoryFlowWaterService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | | import org.springdoc.api.annotations.ParameterObject; |
| | | import org.springframework.http.HttpHeaders; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 库存流水表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 10:22:39 |
| | | */ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/inventoryFlowWater" ) |
| | | @Tag(description = "inventoryFlowWater" , name = "库存流水表管理" ) |
| | | @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) |
| | | public class InventoryFlowWaterController { |
| | | |
| | | private final InventoryFlowWaterService inventoryFlowWaterService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param inventoryFlowWater 库存流水表 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/page" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_inventoryFlowWater_view')" ) |
| | | public R getInventoryFlowWaterPage(@ParameterObject Page page, @ParameterObject InventoryFlowWater inventoryFlowWater) { |
| | | LambdaQueryWrapper<InventoryFlowWater> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(inventoryFlowWaterService.page(page, wrapper)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询库存流水表 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id查询" , description = "通过id查询" ) |
| | | @GetMapping("/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_inventoryFlowWater_view')" ) |
| | | public R getById(@PathVariable("id" ) Long id) { |
| | | return R.ok(inventoryFlowWaterService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增库存流水表 |
| | | * @param inventoryFlowWater 库存流水表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增库存流水表" , description = "新增库存流水表" ) |
| | | @SysLog("新增库存流水表" ) |
| | | @PostMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_inventoryFlowWater_add')" ) |
| | | public R save(@RequestBody InventoryFlowWater inventoryFlowWater) { |
| | | return R.ok(inventoryFlowWaterService.save(inventoryFlowWater)); |
| | | } |
| | | |
| | | /** |
| | | * 修改库存流水表 |
| | | * @param inventoryFlowWater 库存流水表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "修改库存流水表" , description = "修改库存流水表" ) |
| | | @SysLog("修改库存流水表" ) |
| | | @PutMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_inventoryFlowWater_edit')" ) |
| | | public R updateById(@RequestBody InventoryFlowWater inventoryFlowWater) { |
| | | return R.ok(inventoryFlowWaterService.updateById(inventoryFlowWater)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除库存流水表 |
| | | * @param ids id列表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id删除库存流水表" , description = "通过id删除库存流水表" ) |
| | | @SysLog("通过id删除库存流水表" ) |
| | | @DeleteMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_inventoryFlowWater_del')" ) |
| | | public R removeById(@RequestBody Long[] ids) { |
| | | return R.ok(inventoryFlowWaterService.removeBatchByIds(CollUtil.toList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出excel 表格 |
| | | * @param inventoryFlowWater 查询条件 |
| | | * @param ids 导出指定ID |
| | | * @return excel 文件流 |
| | | */ |
| | | @ResponseExcel |
| | | @GetMapping("/export") |
| | | @PreAuthorize("@pms.hasPermission('platformx_inventoryFlowWater_export')" ) |
| | | public List<InventoryFlowWater> export(InventoryFlowWater inventoryFlowWater,Long[] ids) { |
| | | return inventoryFlowWaterService.list(Wrappers.lambdaQuery(inventoryFlowWater).in(ArrayUtil.isNotEmpty(ids), InventoryFlowWater::getId, ids)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.controller; |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.device.entity.ReceivingNote; |
| | | import com.by4cloud.platformx.device.service.ReceivingNoteService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | | import org.springdoc.api.annotations.ParameterObject; |
| | | import org.springframework.http.HttpHeaders; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 验收表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 11:03:52 |
| | | */ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/receivingNote" ) |
| | | @Tag(description = "receivingNote" , name = "验收表管理" ) |
| | | @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) |
| | | public class ReceivingNoteController { |
| | | |
| | | private final ReceivingNoteService receivingNoteService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param receivingNote 验收表 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/page" ) |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNote_view')" ) |
| | | public R getReceivingNotePage(@ParameterObject Page page, @ParameterObject ReceivingNote receivingNote) { |
| | | LambdaQueryWrapper<ReceivingNote> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(receivingNoteService.page(page, wrapper)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询验收表 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id查询" , description = "通过id查询" ) |
| | | @GetMapping("/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNote_view')" ) |
| | | public R getById(@PathVariable("id" ) Long id) { |
| | | return R.ok(receivingNoteService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增验收表 |
| | | * @param receivingNote 验收表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增验收表" , description = "新增验收表" ) |
| | | @SysLog("新增验收表" ) |
| | | @PostMapping |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNote_add')" ) |
| | | public R save(@RequestBody ReceivingNote receivingNote) { |
| | | return R.ok(receivingNoteService.save(receivingNote)); |
| | | } |
| | | |
| | | /** |
| | | * 修改验收表 |
| | | * @param receivingNote 验收表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "修改验收表" , description = "修改验收表" ) |
| | | @SysLog("修改验收表" ) |
| | | @PutMapping |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNote_edit')" ) |
| | | public R updateById(@RequestBody ReceivingNote receivingNote) { |
| | | return R.ok(receivingNoteService.updateById(receivingNote)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除验收表 |
| | | * @param ids id列表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id删除验收表" , description = "通过id删除验收表" ) |
| | | @SysLog("通过id删除验收表" ) |
| | | @DeleteMapping |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNote_del')" ) |
| | | public R removeById(@RequestBody Long[] ids) { |
| | | return R.ok(receivingNoteService.removeBatchByIds(CollUtil.toList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出excel 表格 |
| | | * @param receivingNote 查询条件 |
| | | * @param ids 导出指定ID |
| | | * @return excel 文件流 |
| | | */ |
| | | @ResponseExcel |
| | | @GetMapping("/export") |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNote_export')" ) |
| | | public List<ReceivingNote> export(ReceivingNote receivingNote,Long[] ids) { |
| | | return receivingNoteService.list(Wrappers.lambdaQuery(receivingNote).in(ArrayUtil.isNotEmpty(ids), ReceivingNote::getId, ids)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.controller; |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.device.entity.ReceivingNoteItem; |
| | | import com.by4cloud.platformx.device.service.ReceivingNoteItemService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | | import org.springdoc.api.annotations.ParameterObject; |
| | | import org.springframework.http.HttpHeaders; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 验收子项表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 11:04:28 |
| | | */ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/receivingNoteItem" ) |
| | | @Tag(description = "receivingNoteItem" , name = "验收子项表管理" ) |
| | | @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) |
| | | public class ReceivingNoteItemController { |
| | | |
| | | private final ReceivingNoteItemService receivingNoteItemService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param receivingNoteItem 验收子项表 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/page" ) |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNoteItem_view')" ) |
| | | public R getReceivingNoteItemPage(@ParameterObject Page page, @ParameterObject ReceivingNoteItem receivingNoteItem) { |
| | | LambdaQueryWrapper<ReceivingNoteItem> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(receivingNoteItemService.page(page, wrapper)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询验收子项表 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id查询" , description = "通过id查询" ) |
| | | @GetMapping("/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNoteItem_view')" ) |
| | | public R getById(@PathVariable("id" ) Long id) { |
| | | return R.ok(receivingNoteItemService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增验收子项表 |
| | | * @param receivingNoteItem 验收子项表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增验收子项表" , description = "新增验收子项表" ) |
| | | @SysLog("新增验收子项表" ) |
| | | @PostMapping |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNoteItem_add')" ) |
| | | public R save(@RequestBody ReceivingNoteItem receivingNoteItem) { |
| | | return R.ok(receivingNoteItemService.save(receivingNoteItem)); |
| | | } |
| | | |
| | | /** |
| | | * 修改验收子项表 |
| | | * @param receivingNoteItem 验收子项表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "修改验收子项表" , description = "修改验收子项表" ) |
| | | @SysLog("修改验收子项表" ) |
| | | @PutMapping |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNoteItem_edit')" ) |
| | | public R updateById(@RequestBody ReceivingNoteItem receivingNoteItem) { |
| | | return R.ok(receivingNoteItemService.updateById(receivingNoteItem)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除验收子项表 |
| | | * @param ids id列表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id删除验收子项表" , description = "通过id删除验收子项表" ) |
| | | @SysLog("通过id删除验收子项表" ) |
| | | @DeleteMapping |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNoteItem_del')" ) |
| | | public R removeById(@RequestBody Long[] ids) { |
| | | return R.ok(receivingNoteItemService.removeBatchByIds(CollUtil.toList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出excel 表格 |
| | | * @param receivingNoteItem 查询条件 |
| | | * @param ids 导出指定ID |
| | | * @return excel 文件流 |
| | | */ |
| | | @ResponseExcel |
| | | @GetMapping("/export") |
| | | @PreAuthorize("@pms.hasPermission('device_receivingNoteItem_export')" ) |
| | | public List<ReceivingNoteItem> export(ReceivingNoteItem receivingNoteItem,Long[] ids) { |
| | | return receivingNoteItemService.list(Wrappers.lambdaQuery(receivingNoteItem).in(ArrayUtil.isNotEmpty(ids), ReceivingNoteItem::getId, ids)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.mapper; |
| | | |
| | | import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; |
| | | import com.by4cloud.platformx.device.entity.ContractItem; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ContractItemMapper extends PlatformxBaseMapper<ContractItem> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.mapper; |
| | | |
| | | import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; |
| | | import com.by4cloud.platformx.device.entity.Contract; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ContractMapper extends PlatformxBaseMapper<Contract> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.mapper; |
| | | |
| | | import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; |
| | | import com.by4cloud.platformx.device.entity.DeviceInventory; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceInventoryMapper extends PlatformxBaseMapper<DeviceInventory> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.mapper; |
| | | |
| | | import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; |
| | | import com.by4cloud.platformx.device.entity.InventoryFlowWater; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface InventoryFlowWaterMapper extends PlatformxBaseMapper<InventoryFlowWater> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.mapper; |
| | | |
| | | import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; |
| | | import com.by4cloud.platformx.device.entity.ReceivingNoteItem; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ReceivingNoteItemMapper extends PlatformxBaseMapper<ReceivingNoteItem> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.mapper; |
| | | |
| | | import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; |
| | | import com.by4cloud.platformx.device.entity.ReceivingNote; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ReceivingNoteMapper extends PlatformxBaseMapper<ReceivingNote> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.by4cloud.platformx.device.entity.ContractItem; |
| | | |
| | | public interface ContractItemService extends IService<ContractItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service; |
| | | |
| | | import com.by4cloud.platformx.device.entity.Contract; |
| | | import com.github.yulichang.extension.mapping.base.MPJDeepService; |
| | | |
| | | public interface ContractService extends MPJDeepService<Contract> { |
| | | Boolean saveDeep(Contract contract); |
| | | |
| | | Boolean updateDeep(Contract contract); |
| | | |
| | | Boolean removeDeep(Long[] ids); |
| | | |
| | | Boolean removeChild(Long[] ids); |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.by4cloud.platformx.device.entity.DeviceInventory; |
| | | import com.by4cloud.platformx.device.entity.InventoryFlowWater; |
| | | |
| | | public interface DeviceInventoryService extends IService<DeviceInventory> { |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.by4cloud.platformx.device.entity.InventoryFlowWater; |
| | | |
| | | public interface InventoryFlowWaterService extends IService<InventoryFlowWater> { |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.by4cloud.platformx.device.entity.ReceivingNoteItem; |
| | | |
| | | public interface ReceivingNoteItemService extends IService<ReceivingNoteItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.by4cloud.platformx.device.entity.ReceivingNote; |
| | | |
| | | public interface ReceivingNoteService extends IService<ReceivingNote> { |
| | | |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.by4cloud.platformx.device.entity.ContractItem; |
| | | import com.by4cloud.platformx.device.mapper.ContractItemMapper; |
| | | import com.by4cloud.platformx.device.service.ContractItemService; |
| | | import org.springframework.stereotype.Service; |
| | | /** |
| | | * 合同明细表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 10:48:44 |
| | | */ |
| | | @Service |
| | | public class ContractItemServiceImpl extends ServiceImpl<ContractItemMapper, ContractItem> implements ContractItemService { |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.by4cloud.platformx.device.entity.Contract; |
| | | import com.by4cloud.platformx.device.entity.ContractItem; |
| | | import com.by4cloud.platformx.device.mapper.ContractItemMapper; |
| | | import com.by4cloud.platformx.device.mapper.ContractMapper; |
| | | import com.by4cloud.platformx.device.service.ContractService; |
| | | import org.springframework.stereotype.Service; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.Objects; |
| | | /** |
| | | * 合同表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 10:20:35 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> implements ContractService { |
| | | private final ContractItemMapper contractItemMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean saveDeep(Contract contract) { |
| | | baseMapper.insert(contract); |
| | | for (ContractItem contractItem : contract.getContractItemList()) { |
| | | contractItem.setContractId(contract.getId()); |
| | | contractItemMapper.insert( contractItem); |
| | | } |
| | | |
| | | return Boolean.TRUE; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateDeep(Contract contract) { |
| | | baseMapper.updateById(contract); |
| | | for (ContractItem contractItem : contract.getContractItemList()) { |
| | | if (Objects.isNull(contractItem.getId())) { |
| | | contractItem.setContractId(contract.getId()); |
| | | contractItemMapper.insert(contractItem); |
| | | } else { |
| | | contractItemMapper.updateById(contractItem); |
| | | } |
| | | } |
| | | return Boolean.TRUE; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean removeDeep(Long[] ids) { |
| | | baseMapper.deleteBatchIds(CollUtil.toList(ids)); |
| | | contractItemMapper.delete(Wrappers.<ContractItem>lambdaQuery().in(ContractItem::getContractId, ids)); |
| | | return Boolean.TRUE; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean removeChild(Long[] ids) { |
| | | contractItemMapper.deleteBatchIds(CollUtil.toList(ids)); |
| | | return Boolean.TRUE; |
| | | } |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.by4cloud.platformx.device.entity.DeviceInventory; |
| | | import com.by4cloud.platformx.device.entity.InventoryFlowWater; |
| | | import com.by4cloud.platformx.device.mapper.DeviceInventoryMapper; |
| | | import com.by4cloud.platformx.device.mapper.InventoryFlowWaterMapper; |
| | | import com.by4cloud.platformx.device.service.DeviceInventoryService; |
| | | import com.by4cloud.platformx.device.service.InventoryFlowWaterService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 库存 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 10:22:39 |
| | | */ |
| | | @Service |
| | | public class DeviceInventoryServiceImpl extends ServiceImpl<DeviceInventoryMapper, DeviceInventory> implements DeviceInventoryService { |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.by4cloud.platformx.device.entity.InventoryFlowWater; |
| | | import com.by4cloud.platformx.device.mapper.InventoryFlowWaterMapper; |
| | | import com.by4cloud.platformx.device.service.InventoryFlowWaterService; |
| | | import org.springframework.stereotype.Service; |
| | | /** |
| | | * 库存流水表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 10:22:39 |
| | | */ |
| | | @Service |
| | | public class InventoryFlowWaterServiceImpl extends ServiceImpl<InventoryFlowWaterMapper, InventoryFlowWater> implements InventoryFlowWaterService { |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.by4cloud.platformx.device.entity.ReceivingNoteItem; |
| | | import com.by4cloud.platformx.device.mapper.ReceivingNoteItemMapper; |
| | | import com.by4cloud.platformx.device.service.ReceivingNoteItemService; |
| | | import org.springframework.stereotype.Service; |
| | | /** |
| | | * 验收子项表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 11:04:28 |
| | | */ |
| | | @Service |
| | | public class ReceivingNoteItemServiceImpl extends ServiceImpl<ReceivingNoteItemMapper, ReceivingNoteItem> implements ReceivingNoteItemService { |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.by4cloud.platformx.device.entity.ReceivingNote; |
| | | import com.by4cloud.platformx.device.mapper.ReceivingNoteMapper; |
| | | import com.by4cloud.platformx.device.service.ReceivingNoteService; |
| | | import org.springframework.stereotype.Service; |
| | | /** |
| | | * 验收表 |
| | | * |
| | | * @author pig |
| | | * @date 2025-03-13 11:03:52 |
| | | */ |
| | | @Service |
| | | public class ReceivingNoteServiceImpl extends ServiceImpl<ReceivingNoteMapper, ReceivingNote> implements ReceivingNoteService { |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.by4cloud.platformx.device.mapper.ContractItemMapper"> |
| | | |
| | | <resultMap id="contractItemMap" type="com.by4cloud.platformx.device.entity.ContractItem"> |
| | | <id property="id" column="id"/> |
| | | <result property="amount" column="amount"/> |
| | | <result property="compId" column="comp_id"/> |
| | | <result property="month" column="month"/> |
| | | <result property="name" column="name"/> |
| | | <result property="num" column="num"/> |
| | | <result property="price" column="price"/> |
| | | <result property="specification" column="specification"/> |
| | | <result property="unit" column="unit"/> |
| | | <result property="contractId" column="contract_id"/> |
| | | <result property="deviceId" column="device_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.by4cloud.platformx.device.mapper.ContractMapper"> |
| | | |
| | | <resultMap id="contractMap" type="com.by4cloud.platformx.device.entity.Contract"> |
| | | <id property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="compId" column="comp_id"/> |
| | | <result property="partya" column="partya"/> |
| | | <result property="partyb" column="partyb"/> |
| | | <result property="partyc" column="partyc"/> |
| | | <result property="content" column="content"/> |
| | | <result property="countExecutive" column="count_executive"/> |
| | | <result property="output" column="output"/> |
| | | <result property="executive" column="executive"/> |
| | | <result property="fileName" column="file_name"/> |
| | | <result property="filePath" column="file_path"/> |
| | | <result property="number" column="number"/> |
| | | <result property="releaseDate" column="release_date"/> |
| | | <result property="status" column="status"/> |
| | | <result property="type" column="type"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.by4cloud.platformx.device.mapper.InventoryFlowWaterMapper"> |
| | | |
| | | <resultMap id="inventoryFlowWaterMap" type="com.by4cloud.platformx.device.entity.InventoryFlowWater"> |
| | | <id property="id" column="id"/> |
| | | <result property="inventoryId" column="inventory_id"/> |
| | | <result property="classId" column="class_id"/> |
| | | <result property="deviceId" column="device_id"/> |
| | | <result property="num" column="num"/> |
| | | <result property="planId" column="plan_id"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="compId" column="comp_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.by4cloud.platformx.device.mapper.ReceivingNoteItemMapper"> |
| | | |
| | | <resultMap id="receivingNoteItemMap" type="com.by4cloud.platformx.device.entity.ReceivingNoteItem"> |
| | | <id property="id" column="id"/> |
| | | <result property="compId" column="comp_id"/> |
| | | <result property="noteId" column="note_id"/> |
| | | <result property="contractItemId" column="contract_item_id"/> |
| | | <result property="num" column="num"/> |
| | | <result property="output" column="output"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.by4cloud.platformx.device.mapper.ReceivingNoteMapper"> |
| | | |
| | | <resultMap id="receivingNoteMap" type="com.by4cloud.platformx.device.entity.ReceivingNote"> |
| | | <id property="id" column="id"/> |
| | | <result property="compId" column="comp_id"/> |
| | | <result property="contractId" column="contract_id"/> |
| | | <result property="count" column="count"/> |
| | | <result property="output" column="output"/> |
| | | <result property="releaseCompName" column="release_comp_name"/> |
| | | <result property="releaseDate" column="release_date"/> |
| | | <result property="releasePerson" column="release_person"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.by4cloud.platformx.device.mapper.DeviceInventoryMapper"> |
| | | |
| | | <resultMap id="deviceInventoryMap" type="com.by4cloud.platformx.device.entity.DeviceInventory"> |
| | | <id property="id" column="id"/> |
| | | <result property="deviceNumber" column="device_number"/> |
| | | <result property="serialNo" column="serial_no"/> |
| | | <result property="deviceId" column="device_id"/> |
| | | <result property="deviceId" column="device_id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="source" column="source"/> |
| | | <result property="compId" column="comp_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | </mapper> |