Commit 7b48090e authored by limei's avatar limei

接口修改

parent 65721128
......@@ -292,6 +292,7 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
fileUrl = fileUrl + ",";
}
}
JSONArray jsonArray = jsonObject.getJSONArray("amos_org_code");
for (Object o:jsonArray){
CheckModel checkModel = new CheckModel();
......@@ -311,13 +312,11 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
checkModelService.saveBatch(checkModelList);
// .saveBatch(checkModelList);
return null;
}
@Override
public Boolean modifyModel(JSONObject jsonObject){
......@@ -329,18 +328,38 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
// 截取$之后的所有字符串
// String idxTableName = url.substring(url.indexOf("$")+1);
String modelPictureUrl = jsonObject.getString("modelPictureUrl");
JSONArray PictureUrl = jsonObject.getJSONArray("modelPictureUrl");
String modelPictureUrl = "";
if(!ValidationUtil.isEmpty(PictureUrl)){
for (Object o : PictureUrl) {
JSONObject jo = JSON.parseObject(JSON.toJSONString(o));
modelPictureUrl = jo.getString("url");
break;
}
}
String modelRule = jsonObject.getString("modelRule");
// if(!ValidationUtil.isEmpty(modelRule)){
// modelRule = modelRule.substring(modelRule.indexOf("/"),modelRule.indexOf("."));
// }
String modelFile = jsonObject.getString("modelFile");
// String modelFile = jsonObject.getString("modelFile");
JSONArray modelFile1 = jsonObject.getJSONArray("modelFile");
String modelFile = "";
Iterator iterator = modelFile1.iterator();
if(iterator.hasNext()){
Object o = iterator.next();
JSONObject jo = JSON.parseObject(JSON.toJSONString(o));
modelFile = modelFile+jo.getString("url");
if(iterator.hasNext()){
modelFile = modelFile + ",";
}
}
String amosOrgCode = jsonObject.getString("amosOrgCode");
CheckModel checkModel = this.getById(jsonObject.getString("sequenceNbr"));
checkModel.setAmosOrgCode(amosOrgCode);
checkModel.setModelName(modelName);
......
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