| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | |
| | | private String uidNo; |
| | | private String unit; |
| | | private Long productModelId; |
| | | private LocalDate productionDate; |
| | | private BigDecimal validityPeriod; |
| | | private String label; // 用于树形结构的显示名称 |
| | | private List<ProductTreeDto> children; |
| | | private String nodeType; |
| | |
| | | private Long parentId; // 父级产品ID |
| | | private Long productModelId; // 产品型号ID |
| | | private String productScope; //产品类型 |
| | | private BigDecimal validityPeriod; //有效期 |
| | | } |
| | |
| | | String customer = StringUtils.isBlank(stock.getCustomer()) ? "无客户" : stock.getCustomer(); |
| | | customerNode.setCustomer(customer); |
| | | customerNode.setLabel(customer); |
| | | customerNode.setProductionDate(stock.getProductionDate()); |
| | | customerNode.setValidityPeriod(stock.getValidityPeriod()); |
| | | customerNode.setNodeType("customer"); |
| | | customerNode.setChildren(new ArrayList<>()); |
| | | |
| | |
| | | p1.product_name AS parentName, |
| | | si.batch_no, |
| | | si.customer, |
| | | si.production_date |
| | | si.production_date, |
| | | pm.validity_period |
| | | FROM |
| | | stock_inventory si |
| | | LEFT JOIN product_model pm ON si.product_model_id = pm.id |