This commit is contained in:
parent
a96a9e571e
commit
3ccc377c3a
@ -173,19 +173,19 @@ public class ApplyFormController {
|
||||
applyForm.setType(ApplyTypeEnum.AUDIT);
|
||||
applyFormService.save(applyForm);
|
||||
List<Material> materials;
|
||||
if(applyInfo.getAuditType() == AuditTypeEnum.ALL){
|
||||
materials = materialService.list();
|
||||
}else{
|
||||
if(applyInfo.getAuditType() == AuditTypeEnum.SCAN){
|
||||
materials = materialService.listByIds(applyInfo.getIds());
|
||||
materials.forEach(material -> applyDetailService.save(ApplyDetail.builder()
|
||||
.applyId(applyForm.getId())
|
||||
.materialId(material.getId())
|
||||
.quantity(material.getStock())
|
||||
.build()));
|
||||
}
|
||||
|
||||
materials.forEach(material -> applyDetailService.save(ApplyDetail.builder()
|
||||
.applyId(applyForm.getId())
|
||||
.materialId(material.getId())
|
||||
.quantity(material.getStock())
|
||||
.build()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("wait-scan-data/{applyId}")
|
||||
@Operation(summary = "获取盘点的待扫码信息")
|
||||
public List<WaitScanInfo> getWaitScanData(@Parameter(description = "申请单ID") @PathVariable(name = "applyId") Long applyId) {
|
||||
|
@ -23,6 +23,9 @@ public class AuditApplyInfo extends ApplyForm {
|
||||
@Schema(description = "物料ids")
|
||||
private List<String> ids;
|
||||
|
||||
@Schema(description = "物料类型")
|
||||
private List<String> types;
|
||||
|
||||
|
||||
public ApplyForm to(){
|
||||
return Json.fromJson(ApplyForm.class, Json.toJson(this));
|
||||
|
@ -47,7 +47,7 @@ public class ApplyForm extends IdBaseEntity {
|
||||
@ColDefine(type = ColType.INT)
|
||||
private ApplyTypeEnum type;
|
||||
|
||||
@Schema(description = "盘点类型(1: 全盘 2: 部分盘点)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@Schema(description = "盘点类型(1: 扫码 2: 人工)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@TableField("af_audit_type")
|
||||
@Column("af_audit_type")
|
||||
@Comment("盘点类型")
|
||||
|
@ -13,8 +13,8 @@ import lombok.Getter;
|
||||
@AllArgsConstructor
|
||||
public enum AuditTypeEnum implements ICodeBook {
|
||||
|
||||
ALL("1", "全部盘点"),
|
||||
PARTIAL("2", "部分盘点")
|
||||
SCAN("1", "扫码盘点"),
|
||||
PARTIAL("2", "人工盘点"),
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
|
Loading…
x
Reference in New Issue
Block a user