|
@@ -257,24 +257,21 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
json.put("auditorName", "");
|
|
|
}
|
|
|
|
|
|
- List<String> tagList = materialTagMapper.selectByMaterialId(materialId);
|
|
|
+ List<String> tagList = materialTagMapper.selectByMaterialId(materialInfo.getCode());
|
|
|
if (!Check.isNull(tagList)) {
|
|
|
json.put("tag", tagList);
|
|
|
}
|
|
|
QueryWrapper<MaterialParameter> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("material_id", materialId);
|
|
|
+ queryWrapper.eq("material_id", materialInfo.getCode());
|
|
|
queryWrapper.orderByDesc("create_time");
|
|
|
queryWrapper.last("limit 1");
|
|
|
MaterialParameter materialParameter = materialParameterMapper.selectOne(queryWrapper);
|
|
|
|
|
|
if (!Check.isNull(materialParameter)) {
|
|
|
json.put("parameter", materialParameter);
|
|
|
- } else {
|
|
|
- MaterialParameter materialParameter1 = new MaterialParameter();
|
|
|
- materialParameter1.setMaterialId(materialId);
|
|
|
- json.put("parameter", materialParameter1);
|
|
|
}
|
|
|
- JSONObject ascriptionJson = materialAscriptionMapper.selectByMaterialId(materialId);
|
|
|
+
|
|
|
+ JSONObject ascriptionJson = materialAscriptionMapper.selectByMaterialId(materialInfo.getCode());
|
|
|
if (!Check.isNull(ascriptionJson)) {
|
|
|
json.put("ascription", ascriptionJson);
|
|
|
}
|