Commit c70ce490 authored by limei's avatar limei

修改材料管理编辑接口

parent b8a07c9b
......@@ -104,7 +104,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
return result;
}
/**
* 修改设备+附件信息
* 修改材料+附件信息
* @param sequenceNbr
* @param jsonObject
*/
......@@ -127,13 +127,14 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
materialDto.setBatchNum(jsonObject.getString("batchNum"));
materialDto.setType(jsonObject.getString("type"));
this.updateWithModel(materialDto);
JSONArray subForm = jsonObject.getJSONArray("subForm");
if(ValidationUtil.isEmpty(attachment)){
attachmentServiceImpl.saveAttachment(subForm,sequenceNbr);
}else {
attachment.setInfo(JSON.toJSONString(subForm));
attachmentServiceImpl.updateById(attachment);
if(!ValidationUtil.isEmpty(subForm)){
if(ValidationUtil.isEmpty(attachment)){
attachmentServiceImpl.saveAttachment(subForm,sequenceNbr);
}else {
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