Compare commits
No commits in common. "3744403e1e1d3de55b5b9428bf928d98e61581f2" and "57f6fb52a55896d723616ff00580d621a79f8b24" have entirely different histories.
3744403e1e
...
57f6fb52a5
@ -270,28 +270,17 @@ public class ApplyFormController {
|
|||||||
ApplyForm applyForm = applyInfo.to();
|
ApplyForm applyForm = applyInfo.to();
|
||||||
applyForm.setType(ApplyTypeEnum.AUDIT);
|
applyForm.setType(ApplyTypeEnum.AUDIT);
|
||||||
applyFormService.save(applyForm);
|
applyFormService.save(applyForm);
|
||||||
List<Material> materials = materialService.listByIds(applyInfo.getIds());
|
List<Material> materials;
|
||||||
|
if (applyInfo.getAuditType() == AuditTypeEnum.SCAN) {
|
||||||
|
materials = materialService.listByIds(applyInfo.getIds());
|
||||||
materials.forEach(material -> applyDetailService.save(ApplyDetail.builder()
|
materials.forEach(material -> applyDetailService.save(ApplyDetail.builder()
|
||||||
.applyId(applyForm.getId())
|
.applyId(applyForm.getId())
|
||||||
.materialId(material.getId())
|
.materialId(material.getId())
|
||||||
.quantity(material.getStock())
|
.quantity(material.getStock())
|
||||||
.build()));
|
.build()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("manual/check-data/{applyId}")
|
|
||||||
@Operation(summary = "查询人工盘点选中物料的待核查数据")
|
|
||||||
public List<Material> getManualCheckData(@Parameter(description = "申请单ID") @PathVariable(name = "applyId") Long applyId){
|
|
||||||
List<ApplyDetail> details = applyDetailService.list(Wrappers.<ApplyDetail>lambdaQuery().eq(ApplyDetail::getApplyId, applyId));
|
|
||||||
List<Long> materialIds = details.stream().map(ApplyDetail::getMaterialId).toList();
|
|
||||||
if(materialIds.isEmpty()){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
List<Material> result = materialService.listByIds(materialIds);
|
|
||||||
result.forEach(item -> item.setTypeName(typeService.getTypeName(item.getType())));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("manual/audit-apply")
|
@PostMapping("manual/audit-apply")
|
||||||
@Operation(summary = "提交人工盘点数据")
|
@Operation(summary = "提交人工盘点数据")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user