rev:修正物料信息为空的情况。

This commit is contained in:
2023-07-11 10:26:59 +08:00
parent 35f70da133
commit a020439a97

View File

@@ -116,10 +116,12 @@ public class MdPbClassstandardServiceImpl extends ServiceImpl<MdPbClassstandardM
public List<Map> queryClassById(Map whereJson) {
QueryWrapper<MdPbClassstandard> query = new QueryWrapper<>();
query.eq("1","1");
if (ObjectUtil.isNotEmpty(whereJson.get("material_id"))) {
MdMeMaterialbase one = materialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_id", whereJson.get("material_id")));
whereJson.put("class_idStr",one.getMaterial_type_id());
}
if(ObjectUtil.isNotEmpty(whereJson.get("material_id"))) {
MdMeMaterialbase one = materialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_id", whereJson.get("material_id")));
if(null != one) {
whereJson.put("class_idStr", one.getMaterial_type_id());
}
}
if (ObjectUtil.isNotEmpty(whereJson.get("whereStr"))) {
query.last((String) whereJson.get("whereStr"));
}