Commit 7fc8aecc authored by chenhao's avatar chenhao

和代码丢失了部分

parent 20abe15f
......@@ -153,6 +153,34 @@ public class KeySiteController extends BaseController {
/* BUG 2670 end */
return ResponseHelper.buildResponse(keySiteService.deleteById(sequenceNbrList));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "find/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个重点部位", notes = "根据sequenceNbr查询单个重点部位")
public ResponseModel<KeySiteDto> selectOne(@PathVariable Long sequenceNbr) {
List<String> list = new ArrayList<String>();
Map<String, List<AttachmentDto>> files = sourceFileService.getAttachments(sequenceNbr);
KeySiteDto dto = keySiteService.getSequenceNbr(sequenceNbr);
if (files != null && dto != null) {
dto.setAttachments(files);
JSONArray array = JSONArray.parseArray(JSONArray.toJSONString(files.get("keySitePhoto")));
if (array != null && array.size() > 0) {
for (Object i : array) {
JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(i));
list.add(object.getString("url"));
}
}
}
dto.setAttachmentsList(list);
return ResponseHelper.buildResponse(dto);
}
/**
* 列表分页查询
*
......
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