| | |
| | | @Excel(name = "规格型号") |
| | | private String specificationModel; |
| | | |
| | | /** |
| | | * 料号 |
| | | */ |
| | | @Excel(name = "料号") |
| | | private String materialCode; |
| | | |
| | | @ApiModelProperty(value = "开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | .eq(SalesLedgerProduct::getType, purchaseLedgerDto.getType()); |
| | | List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList(productWrapper); |
| | | |
| | | for (SalesLedgerProduct product : products) { |
| | | ProductModel productModel = productModelMapper.selectById(product.getProductModelId()); |
| | | product.setMaterialCode(productModel.getMaterialCode()); |
| | | } |
| | | |
| | | // 3.查询上传文件 |
| | | LambdaQueryWrapper<CommonFile> salesLedgerFileWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerFileWrapper.eq(CommonFile::getCommonId, purchaseLedger.getId()) |
| | |
| | | import com.ruoyi.basic.mapper.ProductMapper; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | |
| | | if (shippingInfo != null) { |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | } |
| | | |
| | | ProductModel productModel = productModelMapper.selectById(product.getProductModelId()); |
| | | product.setMaterialCode(productModel.getMaterialCode()); |
| | | } |
| | | |
| | | // 3.查询上传文件 |
| | |
| | | */ |
| | | private String model; |
| | | /** |
| | | * 产品料号 |
| | | */ |
| | | private String materialCode; |
| | | /** |
| | | * 产品单位 |
| | | */ |
| | | private String unit; |
| | |
| | | private String productName; |
| | | private String model; |
| | | private String unit; |
| | | |
| | | private String materialCode; |
| | | |
| | | //入库类型 |
| | | private String recordType; |
| | |
| | | */ |
| | | private String model; |
| | | /** |
| | | * 产品料号 |
| | | */ |
| | | private String materialCode; |
| | | /** |
| | | * 产品单位 |
| | | */ |
| | | private String unit; |
| | |
| | | private String productName; |
| | | private String model; |
| | | private String unit; |
| | | private String materialCode; |
| | | |
| | | |
| | | //入库类型 |
| | |
| | | private String productName; |
| | | @Excel(name = "规格型号") |
| | | private String model; |
| | | @Excel(name = "料号") |
| | | private String materialCode; |
| | | @Excel(name = "单位") |
| | | private String unit; |
| | | @Excel(name = "入库来源") |
| | |
| | | @Excel(name = "单位") |
| | | private String unit; |
| | | |
| | | @Excel(name = "料号") |
| | | private String materialCode; |
| | | |
| | | @Excel(name = "库存数量") |
| | | private BigDecimal qualitity; |
| | | |
| | |
| | | private String productName; |
| | | @Excel(name = "规格型号") |
| | | private String model; |
| | | @Excel(name = "料号") |
| | | private String materialCode; |
| | | @Excel(name = "单位") |
| | | private String unit; |
| | | @Excel(name = "出库来源") |
| | |
| | | @Excel(name = "规格") |
| | | private String model; |
| | | |
| | | @Excel(name = "料号") |
| | | private String materialCode; |
| | | |
| | | @Excel(name = "单位") |
| | | private String unit; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockInUnQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | |
| | | List<StockInRecordExportData> list = stockInRecordMapper.listStockInRecordExportData(stockInRecordDto); |
| | | for (StockInRecordExportData stockInRecordExportData : list) { |
| | | if (stockInRecordExportData.getType().equals("0")) { |
| | | stockInRecordExportData.setRecordType(EnumUtil.fromCode(StockOutQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType())).getValue()); |
| | | stockInRecordExportData.setRecordType(EnumUtil.fromCode(StockInQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType())).getValue()); |
| | | } else { |
| | | stockInRecordExportData.setRecordType(EnumUtil.fromCode(StockInUnQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType())).getValue()); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockInUnQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutUnQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.EnumUtil; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | |
| | | if (stockInRecordExportData.getType().equals("0")) { |
| | | stockInRecordExportData.setRecordType(EnumUtil.fromCode(StockOutQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType())).getValue()); |
| | | }else { |
| | | stockInRecordExportData.setRecordType(EnumUtil.fromCode(StockInUnQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType())).getValue()); |
| | | stockInRecordExportData.setRecordType(EnumUtil.fromCode(StockOutUnQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType())).getValue()); |
| | | } |
| | | } |
| | | ExcelUtil<StockOutRecordExportData> util = new ExcelUtil<>(StockOutRecordExportData.class); |
| | |
| | | slp.product_category AS productCategory, |
| | | slp.specification_model AS specificationModel, |
| | | sl.supplier_name AS supplierName, |
| | | pm.material_code AS materialCode, |
| | | SUM(slp.quantity) AS purchaseNum, |
| | | SUM(slp.tax_inclusive_total_price) AS purchaseAmount, |
| | | COUNT(DISTINCT slp.sales_ledger_id) AS purchaseTimes, |
| | |
| | | FROM sales_ledger_product slp |
| | | <!-- 关联台账主表:获取录入日期entry_date --> |
| | | LEFT JOIN purchase_ledger sl ON slp.sales_ledger_id = sl.id |
| | | <!-- 关联产品型号表:获取料号material_code --> |
| | | LEFT JOIN product_model pm ON pm.id = slp.product_model_id |
| | | <!-- 采购日期筛选:可选条件 --> |
| | | WHERE slp.type = 2 <!-- 固定筛选:采购台账(type=2) --> |
| | | <!-- 采购日期筛选:可选条件 --> |
| | | <if test="req.entryDateStart != null and req.entryDateEnd != null"> |
| | |
| | | p.product_name AS product_name, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.material_code AS materialCode, |
| | | u.nick_name AS createBy |
| | | FROM |
| | | stock_in_record AS sir |
| | |
| | | SELECT |
| | | sir.*, |
| | | p.product_name as product_name, |
| | | pm.material_code as materialCode, |
| | | pm.model, |
| | | pm.unit, |
| | | u.nick_name as createBy |
| | |
| | | pm.model, |
| | | si.remark, |
| | | pm.unit, |
| | | pm.material_code as materialCode, |
| | | p.product_name, |
| | | p.parent_id, |
| | | p2.product_name AS parent_name |
| | |
| | | select si.qualitity, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.material_code as materialCode, |
| | | p.product_name, |
| | | coalesce(si.warn_num, 0) as warn_num, |
| | | coalesce(si.locked_quantity, 0) as locked_quantity, |
| | |
| | | select sir.*,si.qualitity as current_stock, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.material_code as materialCode, |
| | | p.product_name, |
| | | su.nick_name as create_by |
| | | from |
| | |
| | | p.product_name as productName, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.material_code as materialCode, |
| | | u.nick_name as createBy |
| | | FROM stock_out_record as sor |
| | | LEFT JOIN product_model as pm on sor.product_model_id = pm.id |
| | |
| | | p.product_name as productName, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.material_code as materialCode, |
| | | u.nick_name as createBy |
| | | FROM stock_out_record as sor |
| | | LEFT JOIN product_model as pm on sor.product_model_id = pm.id |
| | |
| | | (su.qualitity - COALESCE(su.locked_quantity, 0)) AS un_locked_quantity, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.material_code as materialCode, |
| | | p.product_name, |
| | | p2.product_name AS parent_name |
| | | FROM |
| | |
| | | select su.*, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.material_code as materialCode, |
| | | p.product_name |
| | | from stock_uninventory su |
| | | left join product_model pm on su.product_model_id = pm.id |