fix(dqbom): 调整批量查询物料信息接口
This commit is contained in:
parent
70696f4ea4
commit
737c8dd0f8
|
|
@ -256,7 +256,7 @@ public class DQBomApi extends BaseApi {
|
||||||
*/
|
*/
|
||||||
@PostMapping("queryMaterials")
|
@PostMapping("queryMaterials")
|
||||||
@ApiOperation("批量查询物料信息")
|
@ApiOperation("批量查询物料信息")
|
||||||
public ResultVO<List<BaseMaterialVO>> queryMaterials(@Valid @RequestBody @NotEmpty List<QueryMaterialsQuery> query) {
|
public ResultVO<List<QueryMaterialsVO>> queryMaterials(@Valid @RequestBody @NotEmpty List<QueryMaterialsQuery> query) {
|
||||||
return ResultVO.success(dQBomService.queryMaterials(query));
|
return ResultVO.success(dQBomService.queryMaterials(query));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.nflg.product.bomnew.pojo.vo;
|
||||||
|
|
||||||
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
|
import com.nflg.product.bomnew.constant.EBomStatusEnum;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 曹鹏飞
|
||||||
|
* @date 2024/5/26 16:38:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class QueryMaterialsVO extends BaseMaterialVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计人员名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "设计人员名称")
|
||||||
|
private String deviseName = SessionUtil.getRealName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计维护部门名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "设计维护部门名称")
|
||||||
|
private String deptName = SessionUtil.getFullDeptName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createdTime = LocalDateTime.now();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime modifyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本过期时间=下个版本的创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "版本过期时间=下个版本的创建时间")
|
||||||
|
private LocalDateTime expireEndTime = LocalDateTime.parse("9999-12-31 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1=待复核、2=已复核、3=已退回、4=定版(已发布PBOM)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "1=待复核、2=已复核、3=已退回、4=定版(已发布PBOM)99=借用件 100=引用件")
|
||||||
|
private Integer status = EBomStatusEnum.CHECKED.getValue();
|
||||||
|
}
|
||||||
|
|
@ -666,7 +666,7 @@ public class DQBomService {
|
||||||
return datas;
|
return datas;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BaseMaterialVO> queryMaterials(List<QueryMaterialsQuery> query) {
|
public List<QueryMaterialsVO> queryMaterials(List<QueryMaterialsQuery> query) {
|
||||||
List<BaseMaterialVO> datas = new ArrayList<>();
|
List<BaseMaterialVO> datas = new ArrayList<>();
|
||||||
List<String> keys = query.stream().map(QueryMaterialsQuery::getMaterialNo)
|
List<String> keys = query.stream().map(QueryMaterialsQuery::getMaterialNo)
|
||||||
.filter(StrUtil::isNotBlank)
|
.filter(StrUtil::isNotBlank)
|
||||||
|
|
@ -683,6 +683,6 @@ public class DQBomService {
|
||||||
if (CollUtil.isNotEmpty(keys)) {
|
if (CollUtil.isNotEmpty(keys)) {
|
||||||
datas.addAll(SpringUtil.getBean(MaterialMainMapper.class).getMaterialByDrawingNo(keys));
|
datas.addAll(SpringUtil.getBean(MaterialMainMapper.class).getMaterialByDrawingNo(keys));
|
||||||
}
|
}
|
||||||
return datas;
|
return Convert.toList(QueryMaterialsVO.class, datas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue