|
@@ -262,14 +262,12 @@ public class InsurancePolicyController {
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParam(name="id",value = "每月投保单ID",required = true,paramType = "query")
|
|
@ApiImplicitParam(name="id",value = "每月投保单ID",required = true,paramType = "query")
|
|
})
|
|
})
|
|
- public MessageResult<List<String>> attachmentList(String id, @RequestAttribute String subject){
|
|
|
|
|
|
+ public MessageResult<List<Map<String,Object>>> attachmentList(String id, @RequestAttribute String subject){
|
|
|
|
|
|
//当前用户ID
|
|
//当前用户ID
|
|
System.out.println(subject);
|
|
System.out.println(subject);
|
|
|
|
|
|
- MessageResult<List<String>> msgResult = new MessageResult<List<String>>();
|
|
|
|
-
|
|
|
|
- Map<String,String> map = new HashMap<String,String>();
|
|
|
|
|
|
+ MessageResult<List<Map<String,Object>>> msgResult = new MessageResult<List<Map<String,Object>>>();
|
|
|
|
|
|
InsurancePolicy insurancePolicy = insurancePolicyService.get(id);
|
|
InsurancePolicy insurancePolicy = insurancePolicyService.get(id);
|
|
|
|
|
|
@@ -277,10 +275,21 @@ public class InsurancePolicyController {
|
|
|
|
|
|
String[] files = file.split(";");
|
|
String[] files = file.split(";");
|
|
|
|
|
|
- List<String> fileList = new ArrayList<String>();
|
|
|
|
|
|
+ List<Map<String,Object>> fileList = new ArrayList<Map<String,Object>>();
|
|
|
|
+
|
|
|
|
+ int i=1;
|
|
|
|
|
|
for (String str:files) {
|
|
for (String str:files) {
|
|
- fileList.add(str);
|
|
|
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
+ map.put("index",i);
|
|
|
|
+ map.put("file",str);
|
|
|
|
+ String name = "";
|
|
|
|
+ if(StringUtils.isNotEmpty(str)){
|
|
|
|
+ name = str.substring(str.lastIndexOf("/")+1);
|
|
|
|
+ }
|
|
|
|
+ map.put("name",name);
|
|
|
|
+ fileList.add(map);
|
|
|
|
+ i++;
|
|
}
|
|
}
|
|
|
|
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|