46 changed files with 1598 additions and 18 deletions
@ -0,0 +1,24 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilinventoryrecord; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:26 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油库存记录信息", description = "原油库存记录信息") |
|||
@TableName("crude_oil_inventory_record") |
|||
public class CrudeOilInventoryRecord extends BaseEntity { |
|||
|
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//记录时间
|
|||
private String recordDate; |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilinventoryrecord; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油库存记录信息 视图数据详情", description = "原油库存记录信息 视图数据详情") |
|||
public class CrudeOilInventoryRecordDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//记录时间
|
|||
private String recordDate; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilinventoryrecord; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油库存记录信息 数据传输对象", description = "原油库存记录信息 数据传输对象") |
|||
public class CrudeOilInventoryRecordDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//记录时间
|
|||
private String recordDate; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilinventoryrecord; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油库存记录信息 查询条件", description = "原油库存记录信息 查询条件") |
|||
public class CrudeOilInventoryRecordQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//记录时间
|
|||
private String recordDate; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilinventoryrecord; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油库存记录信息 视图数据对象", description = "原油库存记录信息 视图数据对象") |
|||
public class CrudeOilInventoryRecordVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//记录时间
|
|||
private String recordDate; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiloutbound; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:26 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油出库信息", description = "原油出库信息") |
|||
@TableName("crude_oil_outbound") |
|||
public class CrudeOilOutbound extends BaseEntity { |
|||
//销售合同编号
|
|||
private String salesContractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//出库时间
|
|||
private String deliveryDate; |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiloutbound; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油出库信息 视图数据详情", description = "原油出库信息 视图数据详情") |
|||
public class CrudeOilOutboundDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//销售合同编号
|
|||
private String salesContractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
private String remarks; |
|||
//出库时间
|
|||
private String deliveryDate; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiloutbound; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油出库信息 数据传输对象", description = "原油出库信息 数据传输对象") |
|||
public class CrudeOilOutboundDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//销售合同编号
|
|||
private String salesContractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
private String remarks; |
|||
//出库时间
|
|||
private String deliveryDate; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiloutbound; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油出库信息 查询条件", description = "原油出库信息 查询条件") |
|||
public class CrudeOilOutboundQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//销售合同编号
|
|||
private String salesContractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
private String remarks; |
|||
//出库时间
|
|||
private String deliveryDate; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiloutbound; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油出库信息 视图数据对象", description = "原油出库信息 视图数据对象") |
|||
public class CrudeOilOutboundVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//销售合同编号
|
|||
private String salesContractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//油罐编号
|
|||
private String tankNumber; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
private String remarks; |
|||
//出库时间
|
|||
private String deliveryDate; |
|||
private String crudeNumber; |
|||
private String crudeName; |
|||
private double inventory=0; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilstorage; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:26 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油入库信息", description = "原油入库信息") |
|||
@TableName("crude_oil_storage") |
|||
public class CrudeOilStorage extends BaseEntity { |
|||
|
|||
//销售合同编号
|
|||
private String contractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//供应商
|
|||
private String supplierSid; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilstorage; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油入库信息 视图数据详情", description = "原油入库信息 视图数据详情") |
|||
public class CrudeOilStorageDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//销售合同编号
|
|||
private String contractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//供应商
|
|||
private String supplierSid; |
|||
private String remarks; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilstorage; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油入库信息 数据传输对象", description = "原油入库信息 数据传输对象") |
|||
public class CrudeOilStorageDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//销售合同编号
|
|||
private String contractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//供应商
|
|||
private String supplierSid; |
|||
private String remarks; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilstorage; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油入库信息 查询条件", description = "原油入库信息 查询条件") |
|||
public class CrudeOilStorageQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//销售合同编号
|
|||
private String contractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//供应商
|
|||
private String supplierSid; |
|||
private String remarks; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilstorage; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油入库信息 视图数据对象", description = "原油入库信息 视图数据对象") |
|||
public class CrudeOilStorageVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//销售合同编号
|
|||
private String contractNumber; |
|||
//签订时间
|
|||
private String contractSigningDate; |
|||
//油罐sid
|
|||
private String tankSid; |
|||
//油罐编号
|
|||
private String tankNumber; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//供应商
|
|||
private String supplierSid; |
|||
private String remarks; |
|||
private String crudeName; |
|||
private String crudeNumber; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
private double inventory=0; |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiltypeinformation; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import com.yxt.common.core.domain.EntityWithId; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:26 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油类型", description = "原油类型") |
|||
@TableName("crude_oil_type_information") |
|||
public class CrudeOilTypeInformation extends BaseEntity { |
|||
//原油名称
|
|||
private String name; |
|||
//原油编号
|
|||
private String number; |
|||
//原油code
|
|||
private String code; |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiltypeinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油类型 视图数据对象", description = "原油类型 视图数据对象") |
|||
public class CrudeOilTypeInformationDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原油名称
|
|||
private String name; |
|||
//原油编号
|
|||
private String number; |
|||
//原油code
|
|||
private String code; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiltypeinformation; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油类型 数据传输对象", description = "原油类型 数据传输对象") |
|||
public class CrudeOilTypeInformationDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
//原油名称
|
|||
private String name; |
|||
//原油编号
|
|||
private String number; |
|||
//原油code
|
|||
private String code; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiltypeinformation; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油类型 查询条件", description = "原油类型 查询条件") |
|||
public class CrudeOilTypeInformationQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原油名称
|
|||
private String name; |
|||
//原油编号
|
|||
private String number; |
|||
//原油code
|
|||
private String code; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoiltypeinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油类型 视图数据详情", description = "原油类型 视图数据详情") |
|||
public class CrudeOilTypeInformationVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原油名称
|
|||
private String name; |
|||
//原油编号
|
|||
private String number; |
|||
//原油code
|
|||
private String code; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.api.tankinformation; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import com.yxt.common.core.domain.EntityWithId; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:26 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "油罐信息", description = "油罐信息") |
|||
@TableName("tank_information") |
|||
public class TankInformation extends BaseEntity { |
|||
//油罐编号
|
|||
private String number; |
|||
//油罐容量
|
|||
private String capacity; |
|||
//原油类型
|
|||
private String crudeSid; |
|||
//油罐管道
|
|||
private String tankPipeline; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
//油罐初始库存
|
|||
private double initialInventory=0; |
|||
//油罐现有库存
|
|||
private double existingInventory=0; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.api.tankinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "油罐信息 视图数据详情", description = "油罐信息 视图数据详情") |
|||
public class TankInformationDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//油罐编号
|
|||
private String number; |
|||
//油罐容量
|
|||
private String capacity; |
|||
//原油类型
|
|||
private String crudeSid; |
|||
//油罐管道
|
|||
private String tankPipeline; |
|||
//油罐库存
|
|||
private double inventory; |
|||
//油罐初始库存
|
|||
private double initialInventory; |
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.api.tankinformation; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "油罐信息 数据传输对象", description = "油罐信息 数据传输对象") |
|||
public class TankInformationDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//油罐编号
|
|||
private String number; |
|||
//油罐容量
|
|||
private String capacity; |
|||
//原油类型
|
|||
private String crudeSid; |
|||
//油罐管道
|
|||
private String tankPipeline; |
|||
//油罐库存
|
|||
private double inventory; |
|||
//油罐初始库存
|
|||
private double initialInventory; |
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.api.tankinformation; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "油罐信息 查询条件", description = "油罐信息 查询条件") |
|||
public class TankInformationQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//油罐编号
|
|||
private String number; |
|||
//油罐容量
|
|||
private String capacity; |
|||
//原油类型
|
|||
private String crudeSid; |
|||
//油罐管道
|
|||
private String tankPipeline; |
|||
//油罐库存
|
|||
private double inventory; |
|||
//油罐初始库存
|
|||
private double initialInventory; |
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.supervise.cyf.api.tankinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "油罐信息 视图数据对象", description = "油罐信息 视图数据对象") |
|||
public class TankInformationVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//油罐编号
|
|||
private String number; |
|||
//油罐容量
|
|||
private String capacity; |
|||
//原油类型
|
|||
private String crudeSid; |
|||
//原油类型名称
|
|||
private String crudeName; |
|||
//原油类型编号
|
|||
private String crudeNumber; |
|||
//油罐管道
|
|||
private String tankPipeline; |
|||
//油罐库存
|
|||
private double inventory; |
|||
//油罐初始库存
|
|||
private double initialInventory; |
|||
//油罐现有库存
|
|||
private double existingInventory; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilinventoryrecord; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.crudeoilinventoryrecord.CrudeOilInventoryRecord; |
|||
import com.yxt.supervise.cyf.api.crudeoilinventoryrecord.CrudeOilInventoryRecordVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface CrudeOilInventoryRecordMapper extends BaseMapper<CrudeOilInventoryRecord> { |
|||
IPage<CrudeOilInventoryRecordVo> selectPageVo(IPage<CrudeOilInventoryRecord> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilInventoryRecord> qw); |
|||
@Select("select * from crude_oil_inventory_record where sid=#{sid}") |
|||
CrudeOilInventoryRecord getCrudeBySid(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,17 @@ |
|||
<?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.yxt.supervise.cyf.biz.crudeoilinventoryrecord.CrudeOilInventoryRecordMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.crudeoilinventoryrecord.CrudeOilInventoryRecordVo"> |
|||
SELECT |
|||
*,t.number as tankNumber |
|||
FROM |
|||
crude_oil_inventory_record c |
|||
left join tank_information t on t.sid =c.tankSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,50 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilinventoryrecord; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoilinventoryrecord.*; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "原油库存记录信息") |
|||
@RestController |
|||
@RequestMapping("cyf/crudeinventory") |
|||
public class CrudeOilInventoryRecordRest { |
|||
@Autowired |
|||
CrudeOilInventoryRecordService CrudeOilInventoryRecordService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<CrudeOilInventoryRecordVo>> listPage(@RequestBody PagerQuery<CrudeOilInventoryRecordQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<CrudeOilInventoryRecordVo> pv = CrudeOilInventoryRecordService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody CrudeOilInventoryRecordDto dto){ |
|||
return CrudeOilInventoryRecordService.save(dto); |
|||
} |
|||
@ApiOperation("修改") |
|||
@PostMapping("/update") |
|||
public ResultBean update (@RequestBody CrudeOilInventoryRecordDto dto){ |
|||
return CrudeOilInventoryRecordService.update(dto); |
|||
} |
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getCrudeBySid/{sid}") |
|||
public ResultBean getTankBySid(@PathVariable String sid){ |
|||
return CrudeOilInventoryRecordService.getCrudeBySid(sid); |
|||
} |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable String sid ){ |
|||
return CrudeOilInventoryRecordService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilinventoryrecord; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoilinventoryrecord.*; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformation; |
|||
import com.yxt.supervise.cyf.biz.tankinformation.TankInformationMapper; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class CrudeOilInventoryRecordService extends MybatisBaseService<CrudeOilInventoryRecordMapper, CrudeOilInventoryRecord> { |
|||
@Autowired |
|||
TankInformationMapper tankInformationMapper; |
|||
|
|||
public PagerVo<CrudeOilInventoryRecordVo> listPageVo(PagerQuery<CrudeOilInventoryRecordQuery> pq) { |
|||
CrudeOilInventoryRecordQuery query = pq.getParams(); |
|||
QueryWrapper<CrudeOilInventoryRecord> qw = new QueryWrapper<>(); |
|||
IPage<CrudeOilInventoryRecord> page = PagerUtil.queryToPage(pq); |
|||
IPage<CrudeOilInventoryRecordVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<CrudeOilInventoryRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public ResultBean save(CrudeOilInventoryRecordDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilInventoryRecord entity=new CrudeOilInventoryRecord(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
//油罐每日填写信息修改
|
|||
TankInformation tank=tankInformationMapper.getTankBySid(dto.getTankSid()); |
|||
tank.setExistingInventory(dto.getExistingInventory()); |
|||
tankInformationMapper.updateById(tank); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (CrudeOilInventoryRecordDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
CrudeOilInventoryRecord entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public ResultBean getCrudeBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilInventoryRecord CrudeOilInventoryRecord=baseMapper.getCrudeBySid(sid); |
|||
return rb.success().setData(CrudeOilInventoryRecord); |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<CrudeOilInventoryRecord>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoiloutbound; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutbound; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutboundVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface CrudeOilOutboundMapper extends BaseMapper<CrudeOilOutbound> { |
|||
IPage<CrudeOilOutboundVo> selectPageVo(IPage<CrudeOilOutbound> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilOutbound> qw); |
|||
@Select("select * from crude_oil_outbound where sid=#{sid}") |
|||
CrudeOilOutbound getCrudeBySid(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,18 @@ |
|||
<?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.yxt.supervise.cyf.biz.crudeoiloutbound.CrudeOilOutboundMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutboundVo"> |
|||
SELECT |
|||
*,t.number as tankNumber,i.number as crudeNumber,i.name as crudeName,t.inventory as inventory |
|||
FROM |
|||
crude_oil_outbound c |
|||
left join tank_information t on t.sid =c.tankSid |
|||
left join crude_oil_type_information i on i.sid =t.crudeSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,52 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoiloutbound; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutboundDto; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutboundQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutboundVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "出库信息") |
|||
@RestController |
|||
@RequestMapping("cyf/crudeoutbound") |
|||
public class CrudeOilOutboundRest { |
|||
@Autowired |
|||
CrudeOilOutboundService CrudeOilOutboundService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<CrudeOilOutboundVo>> listPage(@RequestBody PagerQuery<CrudeOilOutboundQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<CrudeOilOutboundVo> pv = CrudeOilOutboundService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody CrudeOilOutboundDto dto){ |
|||
return CrudeOilOutboundService.save(dto); |
|||
} |
|||
@ApiOperation("修改") |
|||
@PostMapping("/update") |
|||
public ResultBean update (@RequestBody CrudeOilOutboundDto dto){ |
|||
return CrudeOilOutboundService.update(dto); |
|||
} |
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getCrudeBySid/{sid}") |
|||
public ResultBean getTankBySid(@PathVariable String sid){ |
|||
return CrudeOilOutboundService.getCrudeBySid(sid); |
|||
} |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable String sid ){ |
|||
return CrudeOilOutboundService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoiloutbound; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutbound; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutboundDto; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutboundQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoiloutbound.CrudeOilOutboundVo; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformation; |
|||
import com.yxt.supervise.cyf.biz.tankinformation.TankInformationMapper; |
|||
import com.yxt.supervise.cyf.biz.tankinformation.TankInformationService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class CrudeOilOutboundService extends MybatisBaseService<CrudeOilOutboundMapper, CrudeOilOutbound> { |
|||
@Autowired |
|||
TankInformationMapper tankInformationMapper; |
|||
|
|||
public PagerVo<CrudeOilOutboundVo> listPageVo(PagerQuery<CrudeOilOutboundQuery> pq) { |
|||
CrudeOilOutboundQuery query = pq.getParams(); |
|||
QueryWrapper<CrudeOilOutbound> qw = new QueryWrapper<>(); |
|||
IPage<CrudeOilOutbound> page = PagerUtil.queryToPage(pq); |
|||
IPage<CrudeOilOutboundVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<CrudeOilOutboundVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public ResultBean save(CrudeOilOutboundDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilOutbound entity=new CrudeOilOutbound(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
Date curDate = new Date(); |
|||
String dfmt = DateUtil.format(curDate, "yyyy-MM-dd"); |
|||
entity.setDeliveryDate(dfmt); |
|||
baseMapper.insert(entity); |
|||
TankInformation tank=tankInformationMapper.getTankBySid(dto.getTankSid()); |
|||
//第一次入库/出库的时候用初始库存减去要出入的数量 给总库存
|
|||
// if(tank.getLockVersion().equals(0)){
|
|||
// tank.setInventory(tank.getInitialInventory()-dto.getWeight());
|
|||
// tank.setLockVersion(tank.getLockVersion()+1);
|
|||
// }else{
|
|||
// tank.setInventory(tank.getInventory()-dto.getWeight());
|
|||
// }
|
|||
tank.setInventory(tank.getInventory()-dto.getWeight()); |
|||
tankInformationMapper.updateById(tank); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (CrudeOilOutboundDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
CrudeOilOutbound entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public ResultBean getCrudeBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilOutbound CrudeOilOutbound=baseMapper.getCrudeBySid(sid); |
|||
return rb.success().setData(CrudeOilOutbound); |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<CrudeOilOutbound>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilstorage; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorage; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface CrudeOilStorageMapper extends BaseMapper<CrudeOilStorage> { |
|||
IPage<CrudeOilStorageVo> selectPageVo(IPage<CrudeOilStorage> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilStorage> qw); |
|||
@Select("select * from crude_oil_type_information where sid=#{sid}") |
|||
CrudeOilStorage getCrudeBySid(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,18 @@ |
|||
<?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.yxt.supervise.cyf.biz.crudeoilstorage.CrudeOilStorageMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageVo"> |
|||
SELECT |
|||
*,t.number as tankNumber,i.number as crudeNumber,i.name as crudeName,t.inventory as inventory |
|||
FROM |
|||
crude_oil_storage c |
|||
left join tank_information t on t.sid=c.tankSid |
|||
left join crude_oil_type_information i on i.sid =t.crudeSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,52 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilstorage; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageDto; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "入库信息") |
|||
@RestController |
|||
@RequestMapping("cyf/crudestorage") |
|||
public class CrudeOilStorageRest { |
|||
@Autowired |
|||
CrudeOilStorageService CrudeOilStorageService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<CrudeOilStorageVo>> listPage(@RequestBody PagerQuery<CrudeOilStorageQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<CrudeOilStorageVo> pv = CrudeOilStorageService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody CrudeOilStorageDto dto){ |
|||
return CrudeOilStorageService.save(dto); |
|||
} |
|||
@ApiOperation("修改") |
|||
@PostMapping("/update") |
|||
public ResultBean update (@RequestBody CrudeOilStorageDto dto){ |
|||
return CrudeOilStorageService.update(dto); |
|||
} |
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getCrudeBySid/{sid}") |
|||
public ResultBean getCrudeBySid(@PathVariable String sid){ |
|||
return CrudeOilStorageService.getCrudeBySid(sid); |
|||
} |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable String sid ){ |
|||
return CrudeOilStorageService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,73 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilstorage; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorage; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageDto; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageVo; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformation; |
|||
import com.yxt.supervise.cyf.biz.tankinformation.TankInformationMapper; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class CrudeOilStorageService extends MybatisBaseService<CrudeOilStorageMapper, CrudeOilStorage> { |
|||
@Autowired |
|||
TankInformationMapper tankInformationMapper; |
|||
|
|||
public PagerVo<CrudeOilStorageVo> listPageVo(PagerQuery<CrudeOilStorageQuery> pq) { |
|||
CrudeOilStorageQuery query = pq.getParams(); |
|||
QueryWrapper<CrudeOilStorage> qw = new QueryWrapper<>(); |
|||
IPage<CrudeOilStorage> page = PagerUtil.queryToPage(pq); |
|||
IPage<CrudeOilStorageVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<CrudeOilStorageVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public ResultBean save(CrudeOilStorageDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilStorage entity=new CrudeOilStorage(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
//油罐库存增加
|
|||
TankInformation tank=tankInformationMapper.getTankBySid(dto.getTankSid()); |
|||
//第一次入库/出库的时候用初始库存减去要出入的数量 给总库存
|
|||
// if(tank.getLockVersion().equals(0)){
|
|||
// tank.setInventory(tank.getInitialInventory()+dto.getWeight());
|
|||
// tank.setLockVersion(tank.getLockVersion()+1);
|
|||
// }else{
|
|||
// tank.setInventory(tank.getInventory()+dto.getWeight());
|
|||
// }
|
|||
tank.setInventory(tank.getInventory()+dto.getWeight()); |
|||
tankInformationMapper.updateById(tank); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (CrudeOilStorageDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
CrudeOilStorage entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public ResultBean getCrudeBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilStorage CrudeOilStorage=baseMapper.getCrudeBySid(sid); |
|||
return rb.success().setData(CrudeOilStorage); |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<CrudeOilStorage>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoiltypeinformation; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformation; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface CrudeOilTypeInformationMapper extends BaseMapper<CrudeOilTypeInformation> { |
|||
IPage<CrudeOilTypeInformationVo> selectPageVo(IPage<CrudeOilTypeInformation> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilTypeInformation> qw); |
|||
@Select("select * from crude_oil_type_information") |
|||
List<CrudeOilTypeInformationVo> crudeList(); |
|||
|
|||
|
|||
@Select("select * from crude_oil_type_information where sid=#{sid}") |
|||
CrudeOilTypeInformation getCrudeBySid(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,16 @@ |
|||
<?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.yxt.supervise.cyf.biz.crudeoiltypeinformation.CrudeOilTypeInformationMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationVo"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
crude_oil_type_information |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,61 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoiltypeinformation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationDto; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "原油类型") |
|||
@RestController |
|||
@RequestMapping("cyf/crudeinfo") |
|||
public class CrudeOilTypeInformationRest { |
|||
@Autowired |
|||
CrudeOilTypeInformationService CrudeOilTypeInformationService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<CrudeOilTypeInformationVo>> listPage(@RequestBody PagerQuery<CrudeOilTypeInformationQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<CrudeOilTypeInformationVo> pv = CrudeOilTypeInformationService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("查询数据的列表") |
|||
@PostMapping("/list") |
|||
public ResultBean<PagerVo<CrudeOilTypeInformationVo>> crudeList() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<CrudeOilTypeInformationVo> pv = CrudeOilTypeInformationService.crudeList(); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody CrudeOilTypeInformationDto dto){ |
|||
return CrudeOilTypeInformationService.save(dto); |
|||
} |
|||
@ApiOperation("修改") |
|||
@PostMapping("/update") |
|||
public ResultBean update (@RequestBody CrudeOilTypeInformationDto dto){ |
|||
return CrudeOilTypeInformationService.update(dto); |
|||
} |
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getCrudeBySid/{sid}") |
|||
public ResultBean getTankBySid(@PathVariable String sid){ |
|||
return CrudeOilTypeInformationService.getCrudeBySid(sid); |
|||
} |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable String sid ){ |
|||
return CrudeOilTypeInformationService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoiltypeinformation; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformation; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationDto; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationVo; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformation; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class CrudeOilTypeInformationService extends MybatisBaseService<CrudeOilTypeInformationMapper, CrudeOilTypeInformation> { |
|||
|
|||
|
|||
public PagerVo<CrudeOilTypeInformationVo> listPageVo(PagerQuery<CrudeOilTypeInformationQuery> pq) { |
|||
CrudeOilTypeInformationQuery query = pq.getParams(); |
|||
|
|||
QueryWrapper<CrudeOilTypeInformation> qw = new QueryWrapper<>(); |
|||
if(StringUtils.isNotBlank(query.getName())){ |
|||
qw.like("name",query.getName()); |
|||
} |
|||
IPage<CrudeOilTypeInformation> page = PagerUtil.queryToPage(pq); |
|||
IPage<CrudeOilTypeInformationVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<CrudeOilTypeInformationVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public List<CrudeOilTypeInformationVo> crudeList() { |
|||
return baseMapper.crudeList(); |
|||
|
|||
} |
|||
|
|||
public ResultBean save(CrudeOilTypeInformationDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilTypeInformation number=baseMapper.selectOne(new QueryWrapper<CrudeOilTypeInformation>().eq("number",dto.getNumber())); |
|||
if(number!=null){ |
|||
return rb.setMsg("油类编号重复"); |
|||
} |
|||
CrudeOilTypeInformation name=baseMapper.selectOne(new QueryWrapper<CrudeOilTypeInformation>().eq("name",dto.getNumber())); |
|||
if(name!=null){ |
|||
return rb.setMsg("油类重复"); |
|||
} |
|||
CrudeOilTypeInformation entity=new CrudeOilTypeInformation(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (CrudeOilTypeInformationDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
CrudeOilTypeInformation entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public ResultBean getCrudeBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilTypeInformation CrudeOilTypeInformation=baseMapper.getCrudeBySid(sid); |
|||
return rb.success().setData(CrudeOilTypeInformation); |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<CrudeOilTypeInformation>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.biz.tankinformation; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformation; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformationVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface TankInformationMapper extends BaseMapper<TankInformation> { |
|||
IPage<TankInformationVo> selectPageVo(IPage<TankInformation> page, @Param(Constants.WRAPPER) Wrapper<TankInformation> qw); |
|||
@Select("select t.*,c.name as crudeName,c.number as crudeNumber from tank_information t left join crude_oil_type_information c on c.sid=t.crudeSid ") |
|||
List<TankInformationVo> tankList(); |
|||
@Select("select * from tank_information where sid=#{sid}") |
|||
TankInformation getTankBySid(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,17 @@ |
|||
<?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.yxt.supervise.cyf.biz.tankinformation.TankInformationMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.tankinformation.TankInformationVo"> |
|||
SELECT |
|||
*,c.name as crudeName,c.number as crudeNumber |
|||
FROM |
|||
tank_information t |
|||
left join crude_oil_type_information c on c.sid=t.crudeSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,61 @@ |
|||
package com.yxt.supervise.cyf.biz.tankinformation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformationDto; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformationQuery; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformationVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "油罐信息") |
|||
@RestController |
|||
@RequestMapping("cyf/tankinfo") |
|||
public class TankInformationRest { |
|||
@Autowired |
|||
TankInformationService tankInformationService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<TankInformationVo>> listPage(@RequestBody PagerQuery<TankInformationQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<TankInformationVo> pv = tankInformationService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/tankList") |
|||
public ResultBean<PagerVo<TankInformationVo>> listPage() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<TankInformationVo> pv = tankInformationService.tankList(); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody TankInformationDto dto){ |
|||
return tankInformationService.save(dto); |
|||
} |
|||
@ApiOperation("修改") |
|||
@PostMapping("/update") |
|||
public ResultBean update (@RequestBody TankInformationDto dto){ |
|||
return tankInformationService.update(dto); |
|||
} |
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getTankBySid/{sid}") |
|||
public ResultBean getTankBySid(@PathVariable String sid){ |
|||
return tankInformationService.getTankBySid(sid); |
|||
} |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable String sid ){ |
|||
return tankInformationService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.yxt.supervise.cyf.biz.tankinformation; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformation; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformationDto; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformationQuery; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformationVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class TankInformationService extends MybatisBaseService<TankInformationMapper, TankInformation> { |
|||
|
|||
|
|||
public PagerVo<TankInformationVo> listPageVo(PagerQuery<TankInformationQuery> pq) { |
|||
TankInformationQuery query = pq.getParams(); |
|||
QueryWrapper<TankInformation> qw = new QueryWrapper<>(); |
|||
IPage<TankInformation> page = PagerUtil.queryToPage(pq); |
|||
IPage<TankInformationVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<TankInformationVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public List<TankInformationVo> tankList() { |
|||
|
|||
return baseMapper.tankList(); |
|||
} |
|||
public ResultBean save(TankInformationDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
TankInformation entity=new TankInformation(); |
|||
entity.setInventory(entity.getInitialInventory()); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (TankInformationDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
TankInformation entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public ResultBean getTankBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
TankInformation tankInformation=baseMapper.getTankBySid(sid); |
|||
return rb.success().setData(tankInformation); |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<TankInformation>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
Loading…
Reference in new issue