46 changed files with 1702 additions and 11 deletions
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventory; |
|||
|
|||
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("raw_material_inventory") |
|||
public class RawMaterialInventory extends BaseEntity { |
|||
//原料名称
|
|||
private String name; |
|||
//原料编码
|
|||
private String number; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
//油罐初始库存
|
|||
private double initialInventory=0; |
|||
//原料类型
|
|||
private String typeSid; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventory; |
|||
|
|||
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 RawMaterialInventoryDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原料名称
|
|||
private String name; |
|||
//原料编码
|
|||
private String number; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
//油罐初始库存
|
|||
private double initialInventory=0; |
|||
//原料类型
|
|||
private String typeSid; |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventory; |
|||
|
|||
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 RawMaterialInventoryDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
//原料名称
|
|||
private String name; |
|||
//原料编码
|
|||
private String number; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
//油罐初始库存
|
|||
private double initialInventory=0; |
|||
//原料类型
|
|||
private String typeSid; |
|||
//1 原料 2 包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventory; |
|||
|
|||
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 RawMaterialInventoryQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原料名称
|
|||
private String name; |
|||
//原料编码
|
|||
private String number; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
//油罐初始库存
|
|||
private double initialInventory=0; |
|||
//原料类型
|
|||
private String typeSid; |
|||
//1:原料 2包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventory; |
|||
|
|||
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 RawMaterialInventoryVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原料名称
|
|||
private String name; |
|||
//原料编码
|
|||
private String number; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
//油罐初始库存
|
|||
private double initialInventory=0; |
|||
//原料类型
|
|||
private String typeSid; |
|||
//原料类名称
|
|||
private String typeName; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventoryrecord; |
|||
|
|||
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("raw_material_inventory_record") |
|||
public class RawMaterialInventoryRecord extends BaseEntity { |
|||
//盘库日期
|
|||
private String inventoryDate; |
|||
//盘库库存
|
|||
private String inventory; |
|||
//原料类型
|
|||
private String typeSid; |
|||
//价值
|
|||
private String value; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventoryrecord; |
|||
|
|||
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 RawMaterialInventoryRecordDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//盘库日期
|
|||
private String inventoryDate; |
|||
//盘库库存
|
|||
private String inventory; |
|||
//原料类型
|
|||
private String typeSid; |
|||
//价值
|
|||
private String value; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventoryrecord; |
|||
|
|||
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 RawMaterialInventoryRecordDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//盘库日期
|
|||
private String inventoryDate; |
|||
//盘库库存
|
|||
private String inventory; |
|||
//原料类型
|
|||
private String typeSid; |
|||
//价值
|
|||
private String value; |
|||
//1 原料 2 包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventoryrecord; |
|||
|
|||
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 RawMaterialInventoryRecordQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//盘库日期
|
|||
private String inventoryDate; |
|||
//盘库库存
|
|||
private String inventory; |
|||
//原料类型
|
|||
private String typeSid; |
|||
//价值
|
|||
private String value; |
|||
private String date; |
|||
private String name; |
|||
//1:原料 2包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialinventoryrecord; |
|||
|
|||
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 RawMaterialInventoryRecordVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//盘库日期
|
|||
private String inventoryDate; |
|||
//盘库库存
|
|||
private String inventory; |
|||
//原料库存sid
|
|||
private String inventorySid; |
|||
//价值
|
|||
private String value; |
|||
//原料名称
|
|||
private String name; |
|||
//原料类名称
|
|||
private String typeName; |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialoutbound; |
|||
|
|||
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("raw_material_outbound") |
|||
public class RawMaterialOutbound extends BaseEntity { |
|||
//销售合同号
|
|||
private String salesContractNumber; |
|||
//合同签订日期
|
|||
private String contractSigningDate; |
|||
//出库日期
|
|||
private String deliveryDate; |
|||
//原料库存sid
|
|||
private String inventorySid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialoutbound; |
|||
|
|||
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 RawMaterialOutboundDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//销售合同号
|
|||
private String salesContractNumber; |
|||
//合同签订日期
|
|||
private String contractSigningDate; |
|||
//出库日期
|
|||
private String deliveryDate; |
|||
//原料库存sid
|
|||
private String inventorySid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialoutbound; |
|||
|
|||
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 RawMaterialOutboundDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//销售合同号
|
|||
private String salesContractNumber; |
|||
//合同签订日期
|
|||
private String contractSigningDate; |
|||
//出库日期
|
|||
private String deliveryDate; |
|||
//原料库存sid
|
|||
private String inventorySid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//1 原料 2 包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialoutbound; |
|||
|
|||
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 RawMaterialOutboundQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//销售合同号
|
|||
private String salesContractNumber; |
|||
//合同签订日期
|
|||
private String contractSigningDate; |
|||
//出库日期
|
|||
private String deliveryDate; |
|||
//原料库存sid
|
|||
private String inventorySid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
private String date; |
|||
private String contractNumber; |
|||
//1:原料 2包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialoutbound; |
|||
|
|||
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 RawMaterialOutboundVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//销售合同号
|
|||
private String salesContractNumber; |
|||
//合同签订日期
|
|||
private String contractSigningDate; |
|||
//出库日期
|
|||
private String deliveryDate; |
|||
//原料库存sid
|
|||
private String inventorySid; |
|||
private String typeName; |
|||
//净重
|
|||
private double weight; |
|||
private String name; |
|||
//价值
|
|||
private String value; |
|||
//原料库存
|
|||
private double inventory; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialstorage; |
|||
|
|||
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("raw_material_storage") |
|||
public class RawMaterialStorage extends BaseEntity { |
|||
//合同号
|
|||
private String contractNumber; |
|||
//供应商sid
|
|||
private String supplierSid; |
|||
//签订日期
|
|||
private String contractSigningDate; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//
|
|||
private String inventorySid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialstorage; |
|||
|
|||
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 RawMaterialStorageDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//合同号
|
|||
private String contractNumber; |
|||
//供应商sid
|
|||
private String supplierSid; |
|||
//签订日期
|
|||
private String contractSigningDate; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//
|
|||
private String inventorySid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialstorage; |
|||
|
|||
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 RawMaterialStorageDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//合同号
|
|||
private String contractNumber; |
|||
//供应商sid
|
|||
private String supplierSid; |
|||
//签订日期
|
|||
private String contractSigningDate; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//
|
|||
private String inventorySid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
//1 原料 2 包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialstorage; |
|||
|
|||
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 RawMaterialStorageQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//合同号
|
|||
private String contractNumber; |
|||
//供应商sid
|
|||
private String supplierSid; |
|||
//签订日期
|
|||
private String contractSigningDate; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//
|
|||
private String inventorySid; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
private String date; |
|||
//1:原料 2包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialstorage; |
|||
|
|||
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 RawMaterialStorageVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//合同号
|
|||
private String contractNumber; |
|||
//供应商sid
|
|||
private String supplierSid; |
|||
//签订日期
|
|||
private String contractSigningDate; |
|||
//发货车牌号
|
|||
private String licensePlateNumber; |
|||
//原料库存sid
|
|||
private String inventorySid; |
|||
//原料类型名称
|
|||
private String typeName; |
|||
//净重
|
|||
private double weight; |
|||
//价值
|
|||
private String value; |
|||
//入库日期
|
|||
private String warehousingDate; |
|||
//油罐库存
|
|||
private double inventory=0; |
|||
//原料名称
|
|||
private String name; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialtype; |
|||
|
|||
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("raw_material_type") |
|||
public class RawMaterialType extends BaseEntity { |
|||
//原料编号
|
|||
private String number; |
|||
//原料名称
|
|||
private String name; |
|||
//原料code
|
|||
private String code; |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialtype; |
|||
|
|||
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 RawMaterialTypeDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原料编号
|
|||
private String number; |
|||
//原料名称
|
|||
private String name; |
|||
//原料code
|
|||
private String code; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialtype; |
|||
|
|||
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 RawMaterialTypeDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原料编号
|
|||
private String number; |
|||
//原料名称
|
|||
private String name; |
|||
//原料code
|
|||
private String code; |
|||
//1 原料 2 包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialtype; |
|||
|
|||
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 RawMaterialTypeQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原料编号
|
|||
private String number; |
|||
//原料名称
|
|||
private String name; |
|||
//原料code
|
|||
private String code; |
|||
//1:原料 2包装物
|
|||
private String type; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.api.rawmaterialtype; |
|||
|
|||
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 RawMaterialTypeVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
//原料编号
|
|||
private String number; |
|||
//原料名称
|
|||
private String name; |
|||
//原料code
|
|||
private String code; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialinventory; |
|||
|
|||
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.rawmaterialinventory.RawMaterialInventory; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventoryVo; |
|||
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 RawMaterialInventoryMapper extends BaseMapper<RawMaterialInventory> { |
|||
IPage<RawMaterialInventoryVo> selectPageVo(IPage<RawMaterialInventory> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialInventory> qw); |
|||
@Select(" SELECT" + |
|||
" *,t.name as typeName" + |
|||
" FROM" + |
|||
" raw_material_inventory r" + |
|||
" left join raw_material_type t on t.sid=r.typeSid ") |
|||
List<RawMaterialInventoryVo> inventoryList(); |
|||
@Select("select * from raw_material_inventory where sid=#{sid}") |
|||
RawMaterialInventory getInventoryBySid(@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.rawmaterialinventory.RawMaterialInventoryMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventoryVo"> |
|||
SELECT |
|||
*,t.name as typeName |
|||
FROM |
|||
raw_material_inventory r |
|||
left join raw_material_type t on t.sid=r.typeSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,61 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialinventory; |
|||
|
|||
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.rawmaterialinventory.RawMaterialInventoryDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventoryQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventoryVo; |
|||
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/rawinventory") |
|||
public class RawMaterialInventoryRest { |
|||
@Autowired |
|||
RawMaterialInventoryService RawMaterialInventoryService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<RawMaterialInventoryVo>> listPage(@RequestBody PagerQuery<RawMaterialInventoryQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<RawMaterialInventoryVo> pv = RawMaterialInventoryService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/inventoryList") |
|||
public ResultBean<PagerVo<RawMaterialInventoryVo>> inventoryList() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<RawMaterialInventoryVo> pv = RawMaterialInventoryService.inventoryList(); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody RawMaterialInventoryDto dto){ |
|||
return RawMaterialInventoryService.save(dto); |
|||
} |
|||
@ApiOperation("修改") |
|||
@PostMapping("/update") |
|||
public ResultBean update (@RequestBody RawMaterialInventoryDto dto){ |
|||
return RawMaterialInventoryService.update(dto); |
|||
} |
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getInventoryBySid/{sid}") |
|||
public ResultBean getTankBySid(@PathVariable String sid){ |
|||
return RawMaterialInventoryService.getInventoryBySid(sid); |
|||
} |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable String sid ){ |
|||
return RawMaterialInventoryService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,72 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialinventory; |
|||
|
|||
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.rawmaterialinventory.RawMaterialInventory; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventoryDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventoryQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventoryVo; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class RawMaterialInventoryService extends MybatisBaseService<RawMaterialInventoryMapper, RawMaterialInventory> { |
|||
|
|||
|
|||
public PagerVo<RawMaterialInventoryVo> listPageVo(PagerQuery<RawMaterialInventoryQuery> pq) { |
|||
RawMaterialInventoryQuery query = pq.getParams(); |
|||
QueryWrapper<RawMaterialInventory> qw = new QueryWrapper<>(); |
|||
if(StringUtils.isNotBlank(query.getName())){ |
|||
qw.like("r.name",query.getName()); |
|||
} |
|||
if(StringUtils.isNotBlank(query.getType())){ |
|||
qw.like("r.type",query.getType()); |
|||
} |
|||
IPage<RawMaterialInventory> page = PagerUtil.queryToPage(pq); |
|||
IPage<RawMaterialInventoryVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<RawMaterialInventoryVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public List<RawMaterialInventoryVo> inventoryList() { |
|||
|
|||
return baseMapper.inventoryList(); |
|||
} |
|||
public ResultBean save(RawMaterialInventoryDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialInventory entity=new RawMaterialInventory(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
entity.setInventory(dto.getInitialInventory()); |
|||
baseMapper.insert(entity); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (RawMaterialInventoryDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
RawMaterialInventory entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public ResultBean getInventoryBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialInventory RawMaterialInventory=baseMapper.getInventoryBySid(sid); |
|||
return rb.success().setData(RawMaterialInventory); |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<RawMaterialInventory>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialinventoryrecord; |
|||
|
|||
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.rawmaterialinventoryrecord.RawMaterialInventoryRecord; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordVo; |
|||
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 RawMaterialInventoryRecordMapper extends BaseMapper<RawMaterialInventoryRecord> { |
|||
IPage<RawMaterialInventoryRecordVo> selectPageVo(IPage<RawMaterialInventoryRecord> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialInventoryRecord> qw); |
|||
|
|||
} |
@ -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.rawmaterialinventoryrecord.RawMaterialInventoryRecordMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordVo"> |
|||
SELECT |
|||
*,i.name as name,i.inventory as inventory,t.name as typeName; |
|||
FROM |
|||
raw_material_inventory_record r |
|||
left join raw_material_inventory i on r.inventorySid =i.sid |
|||
left join raw_material_type t on t.sid=i.typeSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,41 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialinventoryrecord; |
|||
|
|||
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.rawmaterialinventoryrecord.RawMaterialInventoryRecordDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordVo; |
|||
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/rawrecord") |
|||
public class RawMaterialInventoryRecordRest { |
|||
@Autowired |
|||
RawMaterialInventoryRecordService RawMaterialInventoryRecordService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<RawMaterialInventoryRecordVo>> listPage(@RequestBody PagerQuery<RawMaterialInventoryRecordQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<RawMaterialInventoryRecordVo> pv = RawMaterialInventoryRecordService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody RawMaterialInventoryRecordDto dto){ |
|||
return RawMaterialInventoryRecordService.save(dto); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialinventoryrecord; |
|||
|
|||
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.rawmaterialinventoryrecord.RawMaterialInventoryRecord; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordVo; |
|||
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 RawMaterialInventoryRecordService extends MybatisBaseService<RawMaterialInventoryRecordMapper, RawMaterialInventoryRecord> { |
|||
|
|||
|
|||
public PagerVo<RawMaterialInventoryRecordVo> listPageVo(PagerQuery<RawMaterialInventoryRecordQuery> pq) { |
|||
RawMaterialInventoryRecordQuery query = pq.getParams(); |
|||
QueryWrapper<RawMaterialInventoryRecord> qw = new QueryWrapper<>(); |
|||
if (StringUtils.isNotBlank(query.getDate())) { |
|||
qw.eq("STR_TO_DATE(r.inventoryDate,'%Y-%m-%d')", query.getDate()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getName())) { |
|||
qw.like("i.name", query.getName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getType())) { |
|||
qw.eq("r.type", query.getType()); |
|||
} |
|||
IPage<RawMaterialInventoryRecord> page = PagerUtil.queryToPage(pq); |
|||
IPage<RawMaterialInventoryRecordVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<RawMaterialInventoryRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public ResultBean save(RawMaterialInventoryRecordDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialInventoryRecord entity=new RawMaterialInventoryRecord(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialoutbound; |
|||
|
|||
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.rawmaterialoutbound.RawMaterialOutbound; |
|||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutboundVo; |
|||
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 RawMaterialOutboundMapper extends BaseMapper<RawMaterialOutbound> { |
|||
IPage<RawMaterialOutboundVo> selectPageVo(IPage<RawMaterialOutbound> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialOutbound> qw); |
|||
@Select(" SELECT" + |
|||
" *,t.name as typeName,i.inventory as inventory" + |
|||
" FROM" + |
|||
" raw_material_outbound o" + |
|||
" left join raw_material_inventory i on i.sid=o.inventorySid" + |
|||
" left join raw_material_type t on t.sid=i.typeSid") |
|||
List<RawMaterialOutboundVo> outboundList(); |
|||
@Select("select * from tank_information where sid=#{sid}") |
|||
RawMaterialOutbound getOutboundBySid(@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.rawmaterialoutbound.RawMaterialOutboundMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutboundVo"> |
|||
SELECT |
|||
*,t.name as typeName,i.inventory as inventory |
|||
FROM |
|||
raw_material_outbound o |
|||
left join raw_material_inventory i on i.sid=o.inventorySid |
|||
left join raw_material_type t on t.sid=i.typeSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,53 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialoutbound; |
|||
|
|||
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.rawmaterialoutbound.RawMaterialOutboundDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutboundQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutboundVo; |
|||
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/rawoutbound") |
|||
public class RawMaterialOutboundRest { |
|||
@Autowired |
|||
RawMaterialOutboundService RawMaterialOutboundService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<RawMaterialOutboundVo>> listPage(@RequestBody PagerQuery<RawMaterialOutboundQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<RawMaterialOutboundVo> pv = RawMaterialOutboundService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/outboundList") |
|||
public ResultBean<PagerVo<RawMaterialOutboundVo>> outboundList() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<RawMaterialOutboundVo> pv = RawMaterialOutboundService.outboundList(); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody RawMaterialOutboundDto dto){ |
|||
return RawMaterialOutboundService.save(dto); |
|||
} |
|||
|
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getOutboundBySid/{sid}") |
|||
public ResultBean getOutboundBySid(@PathVariable String sid){ |
|||
return RawMaterialOutboundService.getOutboundBySid(sid); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialoutbound; |
|||
|
|||
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.rawmaterialinventory.RawMaterialInventory; |
|||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutbound; |
|||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutboundDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutboundQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutboundVo; |
|||
import com.yxt.supervise.cyf.biz.rawmaterialinventory.RawMaterialInventoryMapper; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class RawMaterialOutboundService extends MybatisBaseService<RawMaterialOutboundMapper, RawMaterialOutbound> { |
|||
|
|||
@Autowired |
|||
RawMaterialInventoryMapper rawMaterialInventoryMapper; |
|||
public PagerVo<RawMaterialOutboundVo> listPageVo(PagerQuery<RawMaterialOutboundQuery> pq) { |
|||
RawMaterialOutboundQuery query = pq.getParams(); |
|||
QueryWrapper<RawMaterialOutbound> qw = new QueryWrapper<>(); |
|||
if (StringUtils.isNotBlank(query.getDate())) { |
|||
qw.eq("STR_TO_DATE(o.deliverDate,'%Y-%m-%d')", query.getDate()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getContractNumber())) { |
|||
qw.like("o.salesContractNumber", query.getContractNumber()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getType())) { |
|||
qw.eq("o.type", query.getType()); |
|||
} |
|||
IPage<RawMaterialOutbound> page = PagerUtil.queryToPage(pq); |
|||
IPage<RawMaterialOutboundVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<RawMaterialOutboundVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public List<RawMaterialOutboundVo> outboundList() { |
|||
|
|||
return baseMapper.outboundList(); |
|||
} |
|||
public ResultBean save(RawMaterialOutboundDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialOutbound entity=new RawMaterialOutbound(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
Date curDate = new Date(); |
|||
String dfmt = DateUtil.format(curDate, "yyyy-MM-dd"); |
|||
entity.setDeliveryDate(dfmt); |
|||
baseMapper.insert(entity); |
|||
RawMaterialInventory rawMaterialInventory=rawMaterialInventoryMapper.selectOne(new QueryWrapper<RawMaterialInventory>().eq("sid",dto.getInventorySid())); |
|||
rawMaterialInventory.setInventory(rawMaterialInventory.getInventory()-dto.getWeight()); |
|||
rawMaterialInventoryMapper.updateById(rawMaterialInventory); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
|
|||
public ResultBean getOutboundBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialOutbound RawMaterialOutbound=baseMapper.getOutboundBySid(sid); |
|||
return rb.success().setData(RawMaterialOutbound); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialstorage; |
|||
|
|||
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.rawmaterialstorage.RawMaterialStorage; |
|||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorageVo; |
|||
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 RawMaterialStorageMapper extends BaseMapper<RawMaterialStorage> { |
|||
IPage<RawMaterialStorageVo> selectPageVo(IPage<RawMaterialStorage> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialStorage> qw); |
|||
@Select(" *,t.name as typeName,i.inventory as inventory" + |
|||
" FROM" + |
|||
" raw_material_storage s" + |
|||
" left join raw_material_inventory i on i.sid=s.inventorySid" + |
|||
" left join raw_material_type t on t.sid=i.typeSid") |
|||
List<RawMaterialStorageVo> StorageList(); |
|||
@Select("select * from raw_material_storage where sid=#{sid}") |
|||
RawMaterialStorage getStorageBySid(@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.rawmaterialstorage.RawMaterialStorageMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorageVo"> |
|||
SELECT |
|||
*,t.name as typeName,i.inventory as inventory |
|||
FROM |
|||
raw_material_storage s |
|||
left join raw_material_inventory i on i.sid=s.inventorySid |
|||
left join raw_material_type t on t.sid=i.typeSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,53 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialstorage; |
|||
|
|||
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.rawmaterialstorage.RawMaterialStorageDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorageQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorageVo; |
|||
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/rawstorage") |
|||
public class RawMaterialStorageRest { |
|||
@Autowired |
|||
RawMaterialStorageService RawMaterialStorageService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<RawMaterialStorageVo>> listPage(@RequestBody PagerQuery<RawMaterialStorageQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<RawMaterialStorageVo> pv = RawMaterialStorageService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/tankList") |
|||
public ResultBean<PagerVo<RawMaterialStorageVo>> listPage() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<RawMaterialStorageVo> pv = RawMaterialStorageService.StorageList(); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody RawMaterialStorageDto dto){ |
|||
return RawMaterialStorageService.save(dto); |
|||
} |
|||
|
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getTankBySid/{sid}") |
|||
public ResultBean getTankBySid(@PathVariable String sid){ |
|||
return RawMaterialStorageService.getTankBySid(sid); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,74 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialstorage; |
|||
|
|||
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.rawmaterialinventory.RawMaterialInventory; |
|||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorage; |
|||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorageDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorageQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorageVo; |
|||
import com.yxt.supervise.cyf.biz.rawmaterialinventory.RawMaterialInventoryMapper; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class RawMaterialStorageService extends MybatisBaseService<RawMaterialStorageMapper, RawMaterialStorage> { |
|||
|
|||
@Autowired |
|||
RawMaterialInventoryMapper rawMaterialInventoryMapper; |
|||
public PagerVo<RawMaterialStorageVo> listPageVo(PagerQuery<RawMaterialStorageQuery> pq) { |
|||
RawMaterialStorageQuery query = pq.getParams(); |
|||
QueryWrapper<RawMaterialStorage> qw = new QueryWrapper<>(); |
|||
if (StringUtils.isNotBlank(query.getDate())) { |
|||
qw.eq("STR_TO_DATE(s.deliverDate,'%Y-%m-%d')", query.getDate()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getContractNumber())) { |
|||
qw.like("s.salesContractNumber", query.getContractNumber()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getType())) { |
|||
qw.eq("s.type", query.getType()); |
|||
} |
|||
IPage<RawMaterialStorage> page = PagerUtil.queryToPage(pq); |
|||
IPage<RawMaterialStorageVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<RawMaterialStorageVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public List<RawMaterialStorageVo> StorageList() { |
|||
return baseMapper.StorageList(); |
|||
} |
|||
public ResultBean save(RawMaterialStorageDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialStorage entity=new RawMaterialStorage(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
Date curDate = new Date(); |
|||
String dfmt = DateUtil.format(curDate, "yyyy-MM-dd"); |
|||
entity.setWarehousingDate(dfmt); |
|||
baseMapper.insert(entity); |
|||
RawMaterialInventory rawMaterialInventory=rawMaterialInventoryMapper.selectOne(new QueryWrapper<RawMaterialInventory>().eq("sid",dto.getInventorySid())); |
|||
rawMaterialInventory.setInventory(rawMaterialInventory.getInventory()+dto.getWeight()); |
|||
rawMaterialInventoryMapper.updateById(rawMaterialInventory); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
|
|||
public ResultBean getTankBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialStorage RawMaterialStorage=baseMapper.getStorageBySid(sid); |
|||
return rb.success().setData(RawMaterialStorage); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialtype; |
|||
|
|||
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.rawmaterialtype.RawMaterialType; |
|||
import com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialTypeVo; |
|||
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 RawMaterialTypeMapper extends BaseMapper<RawMaterialType> { |
|||
IPage<RawMaterialTypeVo> selectPageVo(IPage<RawMaterialType> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialType> qw); |
|||
@Select("select * from raw_material_type") |
|||
List<RawMaterialTypeVo> typeList(); |
|||
@Select("select * from raw_material_type where sid=#{sid}") |
|||
RawMaterialType getTypeBySid(@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.rawmaterialtype.RawMaterialTypeMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialTypeVo"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
raw_material_type |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,61 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialtype; |
|||
|
|||
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.rawmaterialtype.RawMaterialTypeDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialTypeQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialTypeVo; |
|||
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/rawtype") |
|||
public class RawMaterialTypeRest { |
|||
@Autowired |
|||
RawMaterialTypeService RawMaterialTypeService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<RawMaterialTypeVo>> listPage(@RequestBody PagerQuery<RawMaterialTypeQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<RawMaterialTypeVo> pv = RawMaterialTypeService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/typeList") |
|||
public ResultBean<PagerVo<RawMaterialTypeVo>> typeList() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<RawMaterialTypeVo> pv = RawMaterialTypeService.typeList(); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody RawMaterialTypeDto dto){ |
|||
return RawMaterialTypeService.save(dto); |
|||
} |
|||
@ApiOperation("修改") |
|||
@PostMapping("/update") |
|||
public ResultBean update (@RequestBody RawMaterialTypeDto dto){ |
|||
return RawMaterialTypeService.update(dto); |
|||
} |
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getTypeBySid/{sid}") |
|||
public ResultBean getTypeBySid(@PathVariable String sid){ |
|||
return RawMaterialTypeService.getTypeBySid(sid); |
|||
} |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable String sid ){ |
|||
return RawMaterialTypeService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.yxt.supervise.cyf.biz.rawmaterialtype; |
|||
|
|||
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.rawmaterialtype.RawMaterialType; |
|||
import com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialTypeDto; |
|||
import com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialTypeQuery; |
|||
import com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialTypeVo; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class RawMaterialTypeService extends MybatisBaseService<RawMaterialTypeMapper, RawMaterialType> { |
|||
|
|||
|
|||
public PagerVo<RawMaterialTypeVo> listPageVo(PagerQuery<RawMaterialTypeQuery> pq) { |
|||
RawMaterialTypeQuery query = pq.getParams(); |
|||
QueryWrapper<RawMaterialType> qw = new QueryWrapper<>(); |
|||
if(StringUtils.isNotBlank(query.getName())){ |
|||
qw.like("name",query.getName()); |
|||
} |
|||
if(StringUtils.isNotBlank(query.getType())){ |
|||
qw.like("type",query.getType()); |
|||
} |
|||
IPage<RawMaterialType> page = PagerUtil.queryToPage(pq); |
|||
IPage<RawMaterialTypeVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<RawMaterialTypeVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public List<RawMaterialTypeVo> typeList() { |
|||
return baseMapper.typeList(); |
|||
} |
|||
public ResultBean save(RawMaterialTypeDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialType entity=new RawMaterialType(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (RawMaterialTypeDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
RawMaterialType entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public ResultBean getTypeBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
RawMaterialType RawMaterialType=baseMapper.getTypeBySid(sid); |
|||
return rb.success().setData(RawMaterialType); |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<RawMaterialType>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
Loading…
Reference in new issue