| | |
| | | */ |
| | | @Excel(name = "退货金额") |
| | | private BigDecimal returnAmount; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | @Excel(name = "厚度(mm)") |
| | | private BigDecimal thickness; |
| | | } |
| | |
| | | private Date checkTime; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 供应商名称(原材料检验) |
| | | */ |
| | |
| | | private String checkResult; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | |
| | | private String workOrderNo; |
| | | @TableField(exist = false) |
| | | private String purchaseContractNo; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | @TableField(exist = false) |
| | | private BigDecimal thickness; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | private String productName; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private BigDecimal thickness; |
| | | |
| | | } |
| | |
| | | import com.ruoyi.stock.pojo.StockInRecord; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | |
| | | @Data |
| | | public class StockInRecordDto extends StockInRecord { |
| | |
| | | //现存量 |
| | | private String currentStock; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private BigDecimal thickness; |
| | | |
| | | } |
| | |
| | | private Long salesLedgerId; |
| | | |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private BigDecimal thickness; |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | |
| | | private String timeStr; |
| | | |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private BigDecimal thickness; |
| | | } |
| | |
| | | * 销售订单产品行ID |
| | | */ |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private BigDecimal thickness; |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | public interface StockInRecordService extends IService<StockInRecord> { |
| | | |
| | | IPage<StockInRecordDto> listPage(Page page, StockInRecordDto stockInRecordDto); |
| | | |
| | | int add(StockInRecordDto stockInRecordDto); |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockInUnQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.EnumUtil; |
| | |
| | | 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()); |
| | | } |
| | |
| | | qi.*, |
| | | <choose> |
| | | <when test="qualityInspect.inspectType == 0"> |
| | | pl.purchase_contract_number as purchase_contract_no |
| | | pl.purchase_contract_number as purchase_contract_no, |
| | | pm.thickness |
| | | </when> |
| | | <otherwise> |
| | | pwo.work_order_no |
| | | pwo.work_order_no, |
| | | pm.thickness |
| | | </otherwise> |
| | | </choose> |
| | | FROM |
| | |
| | | <choose> |
| | | <when test="qualityInspect.inspectType == 0 "> |
| | | LEFT JOIN purchase_ledger pl ON pl.id = qi.purchase_ledger_id |
| | | LEFT JOIN product_model pm ON pm.id = qi.product_model_id |
| | | </when> |
| | | <otherwise> |
| | | LEFT JOIN production_product_main ppm ON qi.product_main_id = ppm.id |
| | | LEFT JOIN product_work_order pwo ON ppm.work_order_id = pwo.id |
| | | LEFT JOIN product_model pm ON pm.id = qi.product_model_id |
| | | </otherwise> |
| | | </choose> |
| | | WHERE |
| | |
| | | <!-- 该产品大类下最后一个录入日期(取台账主表的entry_date) --> |
| | | MAX(sl.entry_date) AS entryDate, |
| | | COALESCE(NULLIF(SUM(t1.return_quantity), 0), 0) AS return_quantity, |
| | | COALESCE(SUM(t2.total_amount), 0) AS return_amount |
| | | COALESCE(SUM(t2.total_amount), 0) AS return_amount, |
| | | pm.thickness |
| | | FROM sales_ledger_product slp |
| | | <!-- 关联台账主表:获取录入日期entry_date --> |
| | | LEFT JOIN purchase_ledger sl ON slp.sales_ledger_id = sl.id |
| | | left join purchase_return_order_products as t1 on t1.sales_ledger_product_id = slp.id |
| | | left join purchase_return_orders as t2 on t2.id = t1.purchase_return_order_id |
| | | 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"> |
| | |
| | | sl.sales_contract_no, |
| | | slp.specification_model, |
| | | p.product_name, |
| | | pm.thickness, |
| | | sl.customer_name |
| | | FROM shipping_info s |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | |
| | | p.product_name as product_name, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.thickness, |
| | | u.nick_name as createBy |
| | | FROM stock_in_record as sir |
| | | LEFT JOIN product_model as pm on sir.product_model_id = pm.id |
| | |
| | | pm.model, |
| | | si.remark, |
| | | pm.unit, |
| | | pm.thickness, |
| | | p.product_name |
| | | from stock_inventory si |
| | | left join product_model pm on si.product_model_id = pm.id |
| | |
| | | select sir.*,si.qualitity as current_stock, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.thickness, |
| | | p.product_name, |
| | | su.nick_name as create_by |
| | | from |
| | |
| | | SELECT |
| | | pm.model, |
| | | pm.unit, |
| | | pm.thickness, |
| | | p.product_name, |
| | | MAX(current_inventory) as current_stock, |
| | | SUM(CASE WHEN record_type = 'in' THEN amount ELSE 0 END) as total_stock_in, |
| | |
| | | p.product_name as productName, |
| | | pm.model, |
| | | pm.unit, |
| | | pm.thickness, |
| | | 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.thickness, |
| | | p.product_name |
| | | from stock_uninventory su |
| | | left join product_model pm on su.product_model_id = pm.id |