feat(log): 添加日志报告备注字段并完善库存管理功能
- 在 LogReport 实体类中新增 remark 备注字段
- 为产品模型添加库存量 Excel 导出功能
- 在日志报告服务中增加抄送人必填验证
- 优化库存盘点计划中的库存锁定状态更新逻辑
| | |
| | | private Integer pushStatus; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(description = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @Schema(description = "创建人") |
| | |
| | | |
| | | @Override |
| | | public Boolean add(LogReportDto sysLogReport) { |
| | | if (ObjectUtils.isEmpty(sysLogReport.getCcUserIds())) { |
| | | throw new RuntimeException("请选择抄送人"); |
| | | } |
| | | String collect = sysLogReport.getCcUserIds().stream() |
| | | .map(String::valueOf) // Long → String |
| | | .collect(Collectors.joining(","));// 拼接为 "1,2,3" |
| | |
| | | |
| | | @Override |
| | | public Boolean updateSysLogReportDto(LogReportDto sysLogReport) { |
| | | if (ObjectUtils.isEmpty(sysLogReport.getCcUserIds())) { |
| | | throw new RuntimeException("请选择抄送人"); |
| | | } |
| | | String collect = sysLogReport.getCcUserIds().stream() |
| | | .map(String::valueOf) // Long → String |
| | | .collect(Collectors.joining(","));// 拼接为 "1,2,3" |
| | |
| | | @Excel(name = "单位") |
| | | private String unit; |
| | | |
| | | @Excel(name = "库存量") |
| | | private String stockInventory; |
| | | |
| | | } |
| | |
| | | * 库存量 |
| | | */ |
| | | @Schema(description = "库存量") |
| | | @Excel(name = "库存量") |
| | | private BigDecimal stockInventory; |
| | | } |
| | |
| | | return R.fail("盘点单不存在"); |
| | | } |
| | | for (StockInventoryCheckItem item : stockInventoryCheckPlanDto.getCheckItems()) { |
| | | //更新库存锁定状态 |
| | | stockInventoryService.updateLocked(item.getProductModelId(),item.getBatchNo(), false); |
| | | if (item.getDifferenceQuantity() == null || item.getDifferenceQuantity().compareTo(BigDecimal.ZERO) == 0) { |
| | | continue; |
| | | } |
| | |
| | | //直接审核通过 |
| | | stockOutRecordService.batchApprove(Collections.singletonList(stock.getId()), 1); |
| | | } |
| | | //更新库存锁定状态 |
| | | stockInventoryService.updateLocked(stockInventoryDto.getProductModelId(),stockInventoryDto.getBatchNo(), false); |
| | | } |
| | | stockInventoryCheckItemMapper.updateById(stockInventoryCheckPlanDto.getCheckItems()); |
| | | plan.setStatus(2); |