Commit c70ce490 authored by limei's avatar limei

修改材料管理编辑接口

parent b8a07c9b
...@@ -104,7 +104,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate ...@@ -104,7 +104,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
return result; return result;
} }
/** /**
* 修改设备+附件信息 * 修改材料+附件信息
* @param sequenceNbr * @param sequenceNbr
* @param jsonObject * @param jsonObject
*/ */
...@@ -127,13 +127,14 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate ...@@ -127,13 +127,14 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
materialDto.setBatchNum(jsonObject.getString("batchNum")); materialDto.setBatchNum(jsonObject.getString("batchNum"));
materialDto.setType(jsonObject.getString("type")); materialDto.setType(jsonObject.getString("type"));
this.updateWithModel(materialDto); this.updateWithModel(materialDto);
JSONArray subForm = jsonObject.getJSONArray("subForm"); JSONArray subForm = jsonObject.getJSONArray("subForm");
if(ValidationUtil.isEmpty(attachment)){ if(!ValidationUtil.isEmpty(subForm)){
attachmentServiceImpl.saveAttachment(subForm,sequenceNbr); if(ValidationUtil.isEmpty(attachment)){
}else { attachmentServiceImpl.saveAttachment(subForm,sequenceNbr);
attachment.setInfo(JSON.toJSONString(subForm)); }else {
attachmentServiceImpl.updateById(attachment); attachment.setInfo(JSON.toJSONString(subForm));
attachmentServiceImpl.updateById(attachment);
}
} }
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment