This commit is contained in:
parent
18f67ef62a
commit
904c01bdbd
@ -44,7 +44,7 @@ public class ApplyFormController {
|
||||
private final IMaterialService materialService;
|
||||
private final IStocktakingScanDetailService stocktakingScanDetailService;
|
||||
private final IStocktakingScanExceptionalDataService stocktakingScanExceptionalDataService;
|
||||
|
||||
private final ITypeService typeService;
|
||||
|
||||
@GetMapping("applies")
|
||||
@Operation(summary = "分页查询申请列表")
|
||||
@ -55,7 +55,9 @@ public class ApplyFormController {
|
||||
@Parameter(description = "物料类型") @RequestParam(name = "type", required = false) String type,
|
||||
@Parameter(description = "物料编码") @RequestParam(name = "code", required = false) String code,
|
||||
@Parameter(description = "物料名称") @RequestParam(name = "name", required = false) String name) {
|
||||
return applyFormService.search(page, size, applyType, type, code, name);
|
||||
IPage<ApplyDTO> result = applyFormService.search(page, size, applyType, type, code, name);
|
||||
result.getRecords().forEach(item -> item.setTypeName(typeService.getTypeName(item.getType())));
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("audit-applies")
|
||||
|
@ -1,10 +1,13 @@
|
||||
package tech.riemann.ims.dto.response;
|
||||
|
||||
import club.zhcs.lina.utils.enums.Codebook;
|
||||
import com.fasterxml.jackson.annotation.JsonGetter;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nutz.json.JsonField;
|
||||
import tech.riemann.ims.enums.ApplyTypeEnum;
|
||||
|
||||
/**
|
||||
@ -29,6 +32,9 @@ public class ApplyDTO {
|
||||
@Schema(description = "物料类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
@Schema(description = "物料规格")
|
||||
private String spec;
|
||||
|
||||
@ -47,4 +53,14 @@ public class ApplyDTO {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@JsonGetter
|
||||
@JsonField
|
||||
public Codebook getApplyTypeInfo() {
|
||||
return applyType == null ? null : applyType.build();
|
||||
}
|
||||
|
||||
public void setApplyTypeInfo(Codebook areaUnitInfo) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,9 @@
|
||||
<when test="applyType == '1'">
|
||||
and f.af_type in ('1', '2')
|
||||
</when>
|
||||
<when test="applyType == '3'">
|
||||
and f.af_type in ('3', '5')
|
||||
</when>
|
||||
<otherwise>
|
||||
and f.af_type = #{applyType}
|
||||
</otherwise>
|
||||
|
Loading…
x
Reference in New Issue
Block a user