浏览代码

文件上传变更为oss

user5 4 年之前
父节点
当前提交
4ea660b1df
共有 21 个文件被更改,包括 814 次插入91 次删除
  1. 85 5
      src/main/java/com/jeeplus/common/bos/BosController.java
  2. 4 0
      src/main/java/com/jeeplus/common/config/Global.java
  3. 35 0
      src/main/java/com/jeeplus/common/oss/OSSClientUtil.java
  4. 8 0
      src/main/java/com/jeeplus/common/persistence/DataEntity.java
  5. 14 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectReportInfo.java
  6. 82 19
      src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java
  7. 1 1
      src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java
  8. 9 0
      src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientAttachment.java
  9. 16 14
      src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractListInfo.java
  10. 2 3
      src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java
  11. 6 0
      src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java
  12. 36 21
      src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java
  13. 6 5
      src/main/resources/jeeplus.properties
  14. 3 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectReportDao.xml
  15. 4 4
      src/main/resources/mappings/modules/workcontractinfo/WorkContractListInfoDao.xml
  16. 447 2
      src/main/webapp/static/oss/ossupload.js
  17. 6 6
      src/main/webapp/webpage/include/head.jsp
  18. 3 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectReport/cost/ruralCostProjectReportList.jsp
  19. 3 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectReport/ruralProjectReportList.jsp
  20. 33 6
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp
  21. 11 0
      src/main/webapp/webpage/modules/workcontractinfo/workContractListInfoList.jsp

+ 85 - 5
src/main/java/com/jeeplus/common/bos/BosController.java

@@ -1,20 +1,24 @@
 package com.jeeplus.common.bos;
 package com.jeeplus.common.bos;
 
 
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.config.Global;
+import com.jeeplus.common.oss.OSSClientUtil;
+import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.FtlUtils;
 import com.jeeplus.common.utils.FtlUtils;
+import com.jeeplus.modules.iim.entity.LayFileJsonData;
+import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.utils.SftpClientUtil;
 import com.jeeplus.modules.utils.SftpClientUtil;
+import org.codehaus.jackson.map.ObjectMapper;
 import org.springframework.mock.web.MockMultipartFile;
 import org.springframework.mock.web.MockMultipartFile;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.io.*;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 
 
 @Controller
 @Controller
 @RequestMapping(value = "${adminPath}/bos/")
 @RequestMapping(value = "${adminPath}/bos/")
@@ -23,7 +27,7 @@ public class BosController {
     private final static String directory = Global.getConfig("remoteServer.directory");
     private final static String directory = Global.getConfig("remoteServer.directory");
     @RequestMapping("upload")
     @RequestMapping("upload")
     @ResponseBody
     @ResponseBody
-    public Map upload(HttpServletRequest request, MultipartFile file){
+    public Map upload(HttpServletRequest request, MultipartFile file, MultipartHttpServletRequest multiRequest){
         Map map = new HashMap();
         Map map = new HashMap();
         String storeAs = request.getParameter("storeAs");
         String storeAs = request.getParameter("storeAs");
         // 文件存储方式(0:本地服务器存储。1:云端存储)
         // 文件存储方式(0:本地服务器存储。1:云端存储)
@@ -45,6 +49,35 @@ public class BosController {
                 map.put("msg","上传失败");
                 map.put("msg","上传失败");
                 map.put("code","0");
                 map.put("code","0");
             }
             }
+        }else if("2".equals(uploadMode)){
+            String filepath = "";
+            LayFileJsonData data = new LayFileJsonData();
+            // 判断文件是否为空
+            Iterator<String> fileNames = multiRequest.getFileNames();
+            while(fileNames.hasNext()) {
+                //取得上传文件
+                file = multiRequest.getFile(fileNames.next());
+                if (!file.isEmpty()) {
+                    // 文件保存路径
+
+                    String realPath =directory.replace("/","")+"/"+storeAs+datePath()+"/"+ System.currentTimeMillis();
+                    OSSClientUtil ossUtil = new OSSClientUtil();
+                    String newName = file.getOriginalFilename();
+
+                    try {
+                        ossUtil.uploadFile2OSS(file.getInputStream(),realPath,newName);
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                    filepath = Global.getAliDownloadUrl() + "/" + realPath + newName;
+
+                    data.setName(file.getOriginalFilename());
+                    data.setSrc(filepath);
+                }
+            }
+
+            map.put("code", "1");
+            map.put("url", data.getSrc());
         }else{
         }else{
 
 
             try {
             try {
@@ -68,6 +101,41 @@ public class BosController {
         return map;
         return map;
     }
     }
 
 
+    /*@RequestMapping("upload")
+    @ResponseBody*/
+    public Map uploadImage(HttpServletResponse response, MultipartHttpServletRequest multiRequest)
+            throws IllegalStateException, IOException {
+        String filepath = "";
+        String content = null;
+        LayFileJsonData data = new LayFileJsonData();
+        String contentType = "";
+        // 判断文件是否为空
+        Iterator<String> fileNames = multiRequest.getFileNames();
+        while(fileNames.hasNext()) {
+            //取得上传文件
+            MultipartFile file = multiRequest.getFile(fileNames.next());
+            if (!file.isEmpty()) {
+                contentType = file.getContentType();
+                // 文件保存路径
+                String realPath ="messages/"+ DateUtils.formatDate(new Date())+"/"+ UserUtils.getPrincipal() + "/";
+                OSSClientUtil ossUtil = new OSSClientUtil();
+                String newName = System.currentTimeMillis()+"-"+file.getOriginalFilename();
+
+                ossUtil.uploadFile2OSS(file.getInputStream(),realPath,newName);
+                filepath = Global.getAliDownloadUrl() + "/" + realPath + newName;
+
+                data.setName(file.getOriginalFilename());
+                data.setSrc(filepath);
+            }
+        }
+
+        HashMap<String, Object> map = new HashMap<String, Object>();
+        map.put("code", "1");
+        map.put("url", data.getSrc());
+
+        return map;
+    }
+
     @RequestMapping("uploadPic")
     @RequestMapping("uploadPic")
     @ResponseBody
     @ResponseBody
     public Map uploadPic(MultipartFile uploadFile){
     public Map uploadPic(MultipartFile uploadFile){
@@ -231,4 +299,16 @@ public class BosController {
         return path;
         return path;
     }
     }
 
 
+    /**
+     * 获取文件存储位置(0:本地;1:百度云;2:阿里云)
+     * @return
+     */
+    @RequestMapping("getFileStorageLocation")
+    @ResponseBody
+    public Map getFileStorageLocation(){
+        Map map = new HashMap();
+        map.put("fileLocation",uploadMode);
+        return map;
+    }
+
 }
 }

+ 4 - 0
src/main/java/com/jeeplus/common/config/Global.java

@@ -184,6 +184,10 @@ public class Global {
 	 */
 	 */
 	public static String getIm() {
 	public static String getIm() {
 		return getConfig("im");
 		return getConfig("im");
+	}/**
+	 */
+	public static String getWorkContractInfo() {
+		return getConfig("workContractInfo");
 	}
 	}
 	/**
 	/**
 	 */
 	 */

+ 35 - 0
src/main/java/com/jeeplus/common/oss/OSSClientUtil.java

@@ -65,6 +65,7 @@ public class OSSClientUtil {
     private String oaBuy = Global.getOaBuy();
     private String oaBuy = Global.getOaBuy();
     private String oaAll = Global.getOaAll();
     private String oaAll = Global.getOaAll();
     private String im = Global.getIm();
     private String im = Global.getIm();
+    private String workContractInfo = Global.getWorkContractInfo();
     private OSSClient ossClient;
     private OSSClient ossClient;
 
 
     public OSSClientUtil() {
     public OSSClientUtil() {
@@ -163,6 +164,8 @@ public class OSSClientUtil {
                 return uploadImg2OSS(fileFile,judgeAttachment);
                 return uploadImg2OSS(fileFile,judgeAttachment);
             case "im":
             case "im":
                 return uploadImg2OSS(fileFile,im);
                 return uploadImg2OSS(fileFile,im);
+            case "workContractInfo":
+                return uploadImg2OSS(fileFile,workContractInfo);
             default:
             default:
                 return "";
                 return "";
         }
         }
@@ -622,6 +625,7 @@ public class OSSClientUtil {
             OSSObject ossObject = ossClient.getObject(bucketName, key);
             OSSObject ossObject = ossClient.getObject(bucketName, key);
             BufferedInputStream in = new BufferedInputStream(ossObject.getObjectContent());
             BufferedInputStream in = new BufferedInputStream(ossObject.getObjectContent());
             BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
             BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
+            newName = URLEncoder.encode(fileName.substring(13, fileName.length()),"UTF8");
             response.setHeader("Content-Disposition","attachment;filename*=UTF-8''"+ newName);
             response.setHeader("Content-Disposition","attachment;filename*=UTF-8''"+ newName);
 
 
             /*if(agent != null && agent.toLowerCase().indexOf("firefox") > 0){
             /*if(agent != null && agent.toLowerCase().indexOf("firefox") > 0){
@@ -739,4 +743,35 @@ public class OSSClientUtil {
         }
         }
         ossClient.shutdown();*/
         ossClient.shutdown();*/
     }
     }
+
+
+    /**
+     * 阿里云获取临时文件查看url
+     * @param file
+     */
+    public String getFileTemporaryLookUrl(String file){
+        URL url = null;
+        try {
+
+            file = file.replace("amp;","");
+            String aliyunUrl = Global.getAliyunUrl();
+            String aliDownloadUrl = Global.getAliDownloadUrl();
+            String cons = "";
+            if (file.contains(aliyunUrl)){
+                cons = aliyunUrl;
+            }else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
+                cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+            }else {
+                cons = aliDownloadUrl;
+            }
+            String key = file.split(cons+"/")[1];
+            // 指定过期时间为60分钟。
+            Date expiration = new Date(new Date().getTime() + 1000 * 60 * 60 );
+            url = ossClient.generatePresignedUrl(bucketName, key, expiration);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return url.toString();
+    }
 }
 }

+ 8 - 0
src/main/java/com/jeeplus/common/persistence/DataEntity.java

@@ -29,6 +29,7 @@ public abstract class DataEntity<T> extends BaseEntity<T> {
 	protected transient User updateBy;	// 更新者
 	protected transient User updateBy;	// 更新者
 	protected transient Date updateDate;	// 更新日期
 	protected transient Date updateDate;	// 更新日期
 	protected transient String delFlag; 	// 删除标记(0:正常;1:删除;2:审核)
 	protected transient String delFlag; 	// 删除标记(0:正常;1:删除;2:审核)
+	protected transient String uploadMode;
 
 
 	public DataEntity() {
 	public DataEntity() {
 		super();
 		super();
@@ -124,4 +125,11 @@ public abstract class DataEntity<T> extends BaseEntity<T> {
 		this.delFlag = delFlag;
 		this.delFlag = delFlag;
 	}
 	}
 
 
+	public String getUploadMode() {
+		return uploadMode;
+	}
+
+	public void setUploadMode(String uploadMode) {
+		this.uploadMode = uploadMode;
+	}
 }
 }

+ 14 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectReportInfo.java

@@ -4,6 +4,7 @@ import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
 import com.jeeplus.modules.sys.entity.Area;
 import com.jeeplus.modules.sys.entity.Area;
 
 
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.Date;
 
 
 /**
 /**
@@ -27,6 +28,7 @@ public class RuralProjectReportInfo extends DataEntity<RuralProjectReportInfo>
     private Double verifyRate;      //核增核减率(%)
     private Double verifyRate;      //核增核减率(%)
     private String principalUser;   //项目负责人
     private String principalUser;   //项目负责人
     private String officeName;      //所属部门
     private String officeName;      //所属部门
+    private BigDecimal allMoney;      //汇总项目开票额
 
 
     private String province;  //项目所在省
     private String province;  //项目所在省
     private String city;  //项目所在市
     private String city;  //项目所在市
@@ -149,7 +151,16 @@ public class RuralProjectReportInfo extends DataEntity<RuralProjectReportInfo>
         this.verifyRate = verifyRate;
         this.verifyRate = verifyRate;
     }
     }
 
 
-    @ExcelField(title="项目负责人", align=2, sort=14)
+    @ExcelField(title="汇总项目开票额", align=2, sort=14)
+    public BigDecimal getAllMoney() {
+        return allMoney;
+    }
+
+    public void setAllMoney(BigDecimal allMoney) {
+        this.allMoney = allMoney;
+    }
+
+    @ExcelField(title="项目负责人", align=2, sort=15)
     public String getPrincipalUser() {
     public String getPrincipalUser() {
         return principalUser;
         return principalUser;
     }
     }
@@ -158,7 +169,7 @@ public class RuralProjectReportInfo extends DataEntity<RuralProjectReportInfo>
         this.principalUser = principalUser;
         this.principalUser = principalUser;
     }
     }
 
 
-    @ExcelField(title="所属部门", align=2, sort=15)
+    @ExcelField(title="所属部门", align=2, sort=16)
     public String getOfficeName() {
     public String getOfficeName() {
         return officeName;
         return officeName;
     }
     }
@@ -183,7 +194,7 @@ public class RuralProjectReportInfo extends DataEntity<RuralProjectReportInfo>
         this.officeId = officeId;
         this.officeId = officeId;
     }
     }
 
 
-    @ExcelField(title="上报状态",dictType="reported_state", align=2, sort=15)
+    @ExcelField(title="上报状态",dictType="reported_state", align=2, sort=17)
     public String getReportedState() {
     public String getReportedState() {
         return reportedState;
         return reportedState;
     }
     }

+ 82 - 19
src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java

@@ -37,6 +37,17 @@ import java.util.*;
 @Transactional(readOnly = true)
 @Transactional(readOnly = true)
 public class WorkattachmentService extends CrudService<WorkattachmentDao, Workattachment> {
 public class WorkattachmentService extends CrudService<WorkattachmentDao, Workattachment> {
 
 
+	/** 文件存储方式(0:本地服务器存储。1:百度云存储;2:阿里云存储) */
+	private final static String uploadMode = Global.getConfig("remoteServer.uploadMode");
+	/**
+	 * 阿里云文件服务器前缀
+	 */
+	private final static String aliyunUrl = Global.getConfig("aliyunUrl");
+	/**
+	 * 百度云文件服务器前缀
+	 */
+	private final static String bosUrl = Global.getConfig("bosUrl");
+
 	@Autowired
 	@Autowired
 	private WorkattachmentDao workattachmentDao;
 	private WorkattachmentDao workattachmentDao;
 	@Autowired
 	@Autowired
@@ -264,7 +275,43 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 		return list;
 		return list;
 	}
 	}
 
 
+	/**
+	 * 新增附件
+	 * @param workattachment
+	 */
+	@Transactional(readOnly = false)
+	public void insertOnWorkClientAttachment(WorkClientAttachment workattachment) {
+		//
+		switch (uploadMode){
+			case "1":
+				workattachment.setUrl(workattachment.getUrl().replace(bosUrl,""));
+				break;
+			case "2":
+				workattachment.setUrl(workattachment.getUrl().replace(aliyunUrl,""));
+				break;
+		}
+		workattachment.preInsert();
+		workClientAttachmentDao.insert(workattachment);
+	}
 
 
+	/**
+	 * 修改附件
+	 * @param workattachment
+	 */
+	@Transactional(readOnly = false)
+	public void updateOnWorkClientAttachment(WorkClientAttachment workattachment) {
+		//
+		switch (uploadMode){
+			case "1":
+				workattachment.setUrl(workattachment.getUrl().replace(bosUrl,""));
+				break;
+			case "2":
+				workattachment.setUrl(workattachment.getUrl().replace(aliyunUrl,""));
+				break;
+		}
+		workattachment.preUpdate();
+		workClientAttachmentDao.update(workattachment);
+	}
 
 
 	/**
 	/**
 	 * 获取附件信息
 	 * 获取附件信息
@@ -309,16 +356,24 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	public static void workClientAttachmentManage(List<WorkClientAttachment> list){
 	public static void workClientAttachmentManage(List<WorkClientAttachment> list){
 		ViewFileUtil viewFileUtil = new ViewFileUtil();
 		ViewFileUtil viewFileUtil = new ViewFileUtil();
 		// 判断文件存储方式(0:本地服务器存储。1:云端存储)
 		// 判断文件存储方式(0:本地服务器存储。1:云端存储)
-		if("0".equals(viewFileUtil.getUploadMode())){
-			//获取本地服务器ip和端口号
-			String serverIPAndPort = viewFileUtil.getServerIPAndPort();
-			//创建展示附件访问方法路径
-			//String methodAccessPath = "/a/viewFile/viewFile/getUploadFile?uploadFilePath=";
-			String methodAccessPath = "";
-			for (WorkClientAttachment info: list) {
-				String newUrl = serverIPAndPort + methodAccessPath + info.getUrl();
-				//变更新的文件查看地址
-				info.setUrl(newUrl);
+		for (WorkClientAttachment info : list) {
+			switch (uploadMode){
+				case "1":
+					info.setUrl(bosUrl + info.getUrl());
+					break;
+				case "2":
+					info.setUrl(aliyunUrl + info.getUrl());
+					break;
+				default:
+					//获取本地服务器ip和端口号
+					String serverIPAndPort = viewFileUtil.getServerIPAndPort();
+					//创建展示附件访问方法路径
+					//String methodAccessPath = "/a/viewFile/viewFile/getUploadFile?uploadFilePath=";
+					String methodAccessPath = "";
+					String newUrl = serverIPAndPort + methodAccessPath + info.getUrl();
+					//变更新的文件查看地址
+					info.setUrl(newUrl);
+					break;
 			}
 			}
 		}
 		}
 	}
 	}
@@ -331,15 +386,23 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	public static void attachmentManage(List<Workattachment> list){
 	public static void attachmentManage(List<Workattachment> list){
 		ViewFileUtil viewFileUtil = new ViewFileUtil();
 		ViewFileUtil viewFileUtil = new ViewFileUtil();
 		// 判断文件存储方式(0:本地服务器存储。1:云端存储)
 		// 判断文件存储方式(0:本地服务器存储。1:云端存储)
-		if("0".equals(viewFileUtil.getUploadMode())){
-			//获取本地服务器ip和端口号
-			String serverIPAndPort = viewFileUtil.getServerIPAndPort();
-			//创建展示附件访问方法路径
-			String methodAccessPath = "/a/viewFile/viewFile/getUploadFile?uploadFilePath=";
-			for (Workattachment info: list) {
-				String newUrl = serverIPAndPort + methodAccessPath + info.getUrl();
-				//变更新的文件查看地址
-				info.setUrl(newUrl);
+		for (Workattachment info : list) {
+			switch (uploadMode){
+				case "1":
+					info.setUrl(bosUrl + info.getUrl());
+					break;
+				case "2":
+					info.setUrl(aliyunUrl + info.getUrl());
+					break;
+				default:
+					//获取本地服务器ip和端口号
+					String serverIPAndPort = viewFileUtil.getServerIPAndPort();
+					//创建展示附件访问方法路径
+					String methodAccessPath = "/a/viewFile/viewFile/getUploadFile?uploadFilePath=";
+					String newUrl = serverIPAndPort + methodAccessPath + info.getUrl();
+					//变更新的文件查看地址
+					info.setUrl(newUrl);
+					break;
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 1
src/main/java/com/jeeplus/modules/sys/web/WorkattachmentController.java

@@ -214,7 +214,7 @@ public class WorkattachmentController extends BaseController {
 	public HashMap<Object, Object> deleteFileFromAliyun(String id,String type,String url,Model model){
 	public HashMap<Object, Object> deleteFileFromAliyun(String id,String type,String url,Model model){
 		if(StringUtils.isNotBlank(id)) {
 		if(StringUtils.isNotBlank(id)) {
 			Workattachment workattachment = workattachmentService.get(id);
 			Workattachment workattachment = workattachmentService.get(id);
-			if("1".equals(uploadMode)) {
+			if("1".equals(uploadMode) || "2".equals(uploadMode)) {
 				workattachmentService.deleteFileFromAliyun(workattachment, workattachment == null ? url : workattachment.getUrl());
 				workattachmentService.deleteFileFromAliyun(workattachment, workattachment == null ? url : workattachment.getUrl());
 			}else{
 			}else{
 				SftpClientUtil sftpClientUtil=new SftpClientUtil();
 				SftpClientUtil sftpClientUtil=new SftpClientUtil();

+ 9 - 0
src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientAttachment.java

@@ -23,6 +23,7 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	private String attachmentFlag; //附件类别
 	private String attachmentFlag; //附件类别
 	private String companyId; //附件类别
 	private String companyId; //附件类别
 	private String projectId; //项目id
 	private String projectId; //项目id
+	private String temporaryUrl;		// 附件地址(临时地址)
 
 
 	public WorkClientAttachment() {
 	public WorkClientAttachment() {
 		super();
 		super();
@@ -100,4 +101,12 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	public void setProjectId(String projectId) {
 	public void setProjectId(String projectId) {
 		this.projectId = projectId;
 		this.projectId = projectId;
 	}
 	}
+
+	public String getTemporaryUrl() {
+		return temporaryUrl;
+	}
+
+	public void setTemporaryUrl(String temporaryUrl) {
+		this.temporaryUrl = temporaryUrl;
+	}
 }
 }

+ 16 - 14
src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractListInfo.java

@@ -127,8 +127,16 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 		this.contractTypeDoc = contractTypeDoc;
 		this.contractTypeDoc = contractTypeDoc;
 	}
 	}
 
 
+	@ExcelField(title="合同规模", align=2, sort=6)
+	public BigDecimal getContractPrice() {
+		return contractPrice;
+	}
+	public void setContractPrice(BigDecimal contractPrice) {
+		this.contractPrice = contractPrice;
+	}
+
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@ExcelField(title="签订日期", align=2, sort=6)
+	@ExcelField(title="签订日期", align=2, sort=7)
 	public Date getContractDate() {
 	public Date getContractDate() {
 		return contractDate;
 		return contractDate;
 	}
 	}
@@ -137,7 +145,7 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 		this.contractDate = contractDate;
 		this.contractDate = contractDate;
 	}
 	}
 
 
-	@ExcelField(title="登记人", align=2, sort=7)
+	@ExcelField(title="登记人", align=2, sort=8)
 	public String getCreateName() {
 	public String getCreateName() {
 		return createName;
 		return createName;
 	}
 	}
@@ -147,13 +155,13 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 	}
 	}
 
 
 	@Override
 	@Override
-	@ExcelField(title="登记日期", align=2, sort=8)
+	@ExcelField(title="登记日期", align=2, sort=9)
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	public Date getCreateDate() {
 	public Date getCreateDate() {
 		return super.getCreateDate();
 		return super.getCreateDate();
 	}
 	}
 
 
-	@ExcelField(title="登记部门", align=2, sort=9)
+	@ExcelField(title="登记部门", align=2, sort=10)
 	public String getOfficeName() {
 	public String getOfficeName() {
 		return officeName;
 		return officeName;
 	}
 	}
@@ -162,7 +170,7 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 		this.officeName = officeName;
 		this.officeName = officeName;
 	}
 	}
 
 
-	@ExcelField(title="归档编号", align=2, sort=10)
+	@ExcelField(title="归档编号", align=2, sort=11)
 	public String getRecordNum() {
 	public String getRecordNum() {
 		return recordNum;
 		return recordNum;
 	}
 	}
@@ -171,7 +179,7 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 		this.recordNum = recordNum;
 		this.recordNum = recordNum;
 	}
 	}
 
 
-	@ExcelField(title="签订状态",/*dictType="audit_contract_state",*/ align=2, sort=11)
+	@ExcelField(title="签订状态",/*dictType="audit_contract_state",*/ align=2, sort=12)
 	public String getContractState() {
 	public String getContractState() {
 		return contractState;
 		return contractState;
 	}
 	}
@@ -180,7 +188,7 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 		this.contractState = contractState;
 		this.contractState = contractState;
 	}
 	}
 
 
-	@ExcelField(title="归档状态",/*dictType="archive_state",*/ align=2, sort=12)
+	@ExcelField(title="归档状态",/*dictType="archive_state",*/ align=2, sort=13)
 	public String getContrractRecordStatus() {
 	public String getContrractRecordStatus() {
 		return contrractRecordStatus;
 		return contrractRecordStatus;
 	}
 	}
@@ -189,7 +197,7 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 		this.contrractRecordStatus = contrractRecordStatus;
 		this.contrractRecordStatus = contrractRecordStatus;
 	}
 	}
 
 
-	@ExcelField(title="借阅状态",/*dictType="archive_state",*/ align=2, sort=13)
+	@ExcelField(title="借阅状态",/*dictType="archive_state",*/ align=2, sort=14)
 	public String getBorrowStatus() {
 	public String getBorrowStatus() {
 		return borrowStatus;
 		return borrowStatus;
 	}
 	}
@@ -234,12 +242,6 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 	public void setTotalContractName(String totalContractName) {
 	public void setTotalContractName(String totalContractName) {
 		this.totalContractName = totalContractName;
 		this.totalContractName = totalContractName;
 	}
 	}
-	public BigDecimal getContractPrice() {
-		return contractPrice;
-	}
-	public void setContractPrice(BigDecimal contractPrice) {
-		this.contractPrice = contractPrice;
-	}
 
 
 	public Date getBeginContractDate() {
 	public Date getBeginContractDate() {
 		return beginContractDate;
 		return beginContractDate;

+ 2 - 3
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -536,12 +536,11 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 				workClientAttachment.setAttachmentFlag("44");
 				workClientAttachment.setAttachmentFlag("44");
 				workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
 				workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
 				if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())){
 				if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())){
-					workClientAttachment.preInsert();
-					workClientAttachmentDao.insert(workClientAttachment);
+					workattachmentService.insertOnWorkClientAttachment(workClientAttachment);
 					signatureDocumentService.createIsignature(workClientAttachment.getUrl(),workClientAttachment.getAttachmentName(),workClientAttachment.getId(),workContractInfo.getName());
 					signatureDocumentService.createIsignature(workClientAttachment.getUrl(),workClientAttachment.getAttachmentName(),workClientAttachment.getId(),workContractInfo.getName());
 				}else{
 				}else{
 					workClientAttachment.preUpdate();
 					workClientAttachment.preUpdate();
-					workClientAttachmentDao.update(workClientAttachment);
+					workattachmentService.updateOnWorkClientAttachment(workClientAttachment);
 				}
 				}
 			}else{
 			}else{
 				workClientAttachmentDao.delete(workClientAttachment);
 				workClientAttachmentDao.delete(workClientAttachment);

+ 6 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java

@@ -448,6 +448,12 @@ public class WorkContractInfoController extends BaseController {
     public String form(WorkContractInfo workContractInfo, Model model) {
     public String form(WorkContractInfo workContractInfo, Model model) {
         //getSort(workContractInfo);
         //getSort(workContractInfo);
         String view = "workContractInfoFormAdd";
         String view = "workContractInfoFormAdd";
+        if("2".equals(uploadMode)){
+            for (WorkClientAttachment attachment: workContractInfo.getWorkAttachments()) {
+                attachment.setTemporaryUrl(new OSSClientUtil().getFileTemporaryLookUrl(attachment.getUrl()));
+            }
+        }
+        workContractInfo.setUploadMode(uploadMode);
         //驳回状态数据操作
         //驳回状态数据操作
         if (StringUtils.isNotBlank(workContractInfo.getId())&&("4").equals(workContractInfo.getContractState())) {
         if (StringUtils.isNotBlank(workContractInfo.getId())&&("4").equals(workContractInfo.getContractState())) {
             ProcessInstance processInstance = actTaskService.getProcIns(workContractInfo.getProcessInstanceId());
             ProcessInstance processInstance = actTaskService.getProcIns(workContractInfo.getProcessInstanceId());

+ 36 - 21
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -578,26 +578,26 @@ public class WorkFullManageController extends BaseController {
 	 */
 	 */
 	@RequestMapping("/downLoadAttach")
 	@RequestMapping("/downLoadAttach")
 	public String downLoadAttach(String file,HttpServletResponse response) throws IOException {
 	public String downLoadAttach(String file,HttpServletResponse response) throws IOException {
-//		file = file.replace("amp;","");
-//		String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
-//		String aliyunUrl = Global.getAliyunUrl();
-//		String aliDownloadUrl = Global.getAliDownloadUrl();
-//		String cons = "";
-//		if (file.contains(aliyunUrl)){
-//			cons = aliyunUrl;
-//		}else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
-//			cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
-//		}else {
-//			cons = aliDownloadUrl;
-//		}
-//		String key = file.split(cons+"/")[1];
-//		logger.info("-----------------------------------------");
-//		logger.info("fileName="+fileName);
-//		logger.info("key="+key);
-//		logger.info("-----------------------------------------");
-//		new OSSClientUtil().downByStream(key,fileName,response,request.getHeader("USER-AGENT"));
-//		return null;
-		OutputStream out = null;
+		file = file.replace("amp;","");
+		String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+		String aliyunUrl = Global.getAliyunUrl();
+		String aliDownloadUrl = Global.getAliDownloadUrl();
+		String cons = "";
+		if (file.contains(aliyunUrl)){
+			cons = aliyunUrl;
+		}else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
+			cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+		}else {
+			cons = aliDownloadUrl;
+		}
+		String key = file.split(cons+"/")[1];
+		logger.info("-----------------------------------------");
+		logger.info("fileName="+fileName);
+		logger.info("key="+key);
+		logger.info("-----------------------------------------");
+		new OSSClientUtil().downByStream(key,fileName,response,request.getHeader("USER-AGENT"));
+		return null;
+		/*OutputStream out = null;
 		InputStream in = null;
 		InputStream in = null;
 		if("1".equals(uploadMode)){
 		if("1".equals(uploadMode)){
 			try {
 			try {
@@ -637,8 +637,23 @@ public class WorkFullManageController extends BaseController {
 			sftpClientUtil.download(file,fileName,response);
 			sftpClientUtil.download(file,fileName,response);
 		}
 		}
 
 
-		return null;
+		return null;*/
+
+	}
 
 
+
+
+	/**
+	 * 阿里云文件通过文件key获取临时查看url
+	 * @return
+	 */
+	@RequestMapping("getFileTemporaryLookUrl")
+	@ResponseBody
+	public Map getFileTemporaryLookUrl(String file,HttpServletResponse response){
+		Map map = new HashMap();
+		String lookUrl = new OSSClientUtil().getFileTemporaryLookUrl(file);
+		map.put("lookUrl",lookUrl);
+		return map;
 	}
 	}
 
 
 	/**
 	/**

+ 6 - 5
src/main/resources/jeeplus.properties

@@ -149,9 +149,9 @@ aliyunUrl=http://oss.gangwaninfo.com
 aliyunDownloadUrl=http://cdn.gangwaninfo.com
 aliyunDownloadUrl=http://cdn.gangwaninfo.com
 oSSUrl=http://cdn.gangwaninfo.com/jeeplus-resource-data/static
 oSSUrl=http://cdn.gangwaninfo.com/jeeplus-resource-data/static
 endpoint=http://oss-cn-hangzhou.aliyuncs.com
 endpoint=http://oss-cn-hangzhou.aliyuncs.com
-accessKeyId=LTAIi7VuxcgfJR2x
-accessKeySecret=Q9xF9V7tcnCI28ttUsP8H4GyAhZta7
-bucketName=gangwan-app
+accessKeyId=LTAI5tQDWoM9c1WyJNPs86rX
+accessKeySecret=84dDIx4edT1n78KUOqqSmDZ35pchJv
+bucketName=xgxm-test
 avatarDir=app-img/avatar/
 avatarDir=app-img/avatar/
 notifyDir=app-img/notify/
 notifyDir=app-img/notify/
 reportDir=app-img/report/
 reportDir=app-img/report/
@@ -240,6 +240,7 @@ yy_shcxurl=https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterprise
 #yy_shcxurl=https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseTicketInfo?id=ID
 #yy_shcxurl=https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseTicketInfo?id=ID
 
 
 #\u767E\u5EA6BOS
 #\u767E\u5EA6BOS
+bosUrl=https://newxgccpm.su.bcebos.com
 bos_access_key=9915286aab2949949b489e8ab3f70a09
 bos_access_key=9915286aab2949949b489e8ab3f70a09
 bos_secret_key=069036bdb93c4bc59c4995ccc543243e
 bos_secret_key=069036bdb93c4bc59c4995ccc543243e
 bos_endpoint=http://su.bcebos.com
 bos_endpoint=http://su.bcebos.com
@@ -274,8 +275,8 @@ remoteServer.directory =/attachment-file
 remoteServer.winDirectory =d:/attachment-file
 remoteServer.winDirectory =d:/attachment-file
 
 
 
 
-#\u6587\u4EF6\u5B58\u50A8\u65B9\u5F0F\uFF080\uFF1A\u672C\u5730\u670D\u52A1\u5668\u5B58\u50A8\u30021\uFF1A\u4E91\u7AEF\u5B58\u50A8\uFF09
-remoteServer.uploadMode =1
+#\u6587\u4EF6\u5B58\u50A8\u65B9\u5F0F\uFF080\uFF1A\u672C\u5730\u670D\u52A1\u5668\u5B58\u50A8\u30021\uFF1A\u767E\u5EA6\u4E91\u5B58\u50A8\uFF1B2\uFF1A\u963F\u91CC\u4E91\uFF09
+remoteServer.uploadMode =2
 
 
 #\u6587\u4EF6\u670D\u52A1\u5668IP\u5730\u5740
 #\u6587\u4EF6\u670D\u52A1\u5668IP\u5730\u5740
 remoteServer.visit =
 remoteServer.visit =

+ 3 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectReportDao.xml

@@ -92,9 +92,11 @@
 			<include refid="ruralProjectInfoColumns"/>
 			<include refid="ruralProjectInfoColumns"/>
 			,ifnull(rprr.report_status,0) as "reportedState"
 			,ifnull(rprr.report_status,0) as "reportedState"
 			,rprr.process_instance_id as "reportedProcessInstanceId"
 			,rprr.process_instance_id as "reportedProcessInstanceId"
+			,sum(wi.money) as allMoney
 		FROM rural_project_records a
 		FROM rural_project_records a
 		<include refid="ruralProjectInfoJoins"/>
 		<include refid="ruralProjectInfoJoins"/>
 		left join rural_project_records_reported rprr on rprr.id = a.id
 		left join rural_project_records_reported rprr on rprr.id = a.id
+		left join work_invoice wi on wi.project_id = a.id
 		<where>
 		<where>
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5
 			<if test="year != null and year != ''">
 			<if test="year != null and year != ''">
@@ -150,6 +152,7 @@
 				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
 				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
 			</if>
 			</if>
 		</where>
 		</where>
+		group by a.id
 		<choose>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
 				ORDER BY ${page.orderBy}

+ 4 - 4
src/main/resources/mappings/modules/workcontractinfo/WorkContractListInfoDao.xml

@@ -79,14 +79,14 @@
 			<if test="beginContractDate != null and endContractDate != null and beginContractDate != '' and endContractDate != ''">
 			<if test="beginContractDate != null and endContractDate != null and beginContractDate != '' and endContractDate != ''">
 				AND a.contract_date BETWEEN #{beginContractDate} AND #{endContractDate}
 				AND a.contract_date BETWEEN #{beginContractDate} AND #{endContractDate}
 			</if>
 			</if>
-			<if test="contractPrice != '' and contractPrice != null">
-				AND a.contract_price like concat('%',#{contractPrice},'%')
-			</if>
 			<if test="contractState != null and contractState != ''">
 			<if test="contractState != null and contractState != ''">
 				AND a.contract_state = #{contractState}
 				AND a.contract_state = #{contractState}
 			</if>
 			</if>
 
 
-
+			/*合同规模*/
+			<if test="contractPrice != '' and contractPrice != null">
+				AND a.contract_price like concat('%',#{contractPrice},'%')
+			</if>
 			/*合同年份*/
 			/*合同年份*/
 			<if test="year != null and year != ''">
 			<if test="year != null and year != ''">
 				AND YEAR(a.contract_date) = #{year}
 				AND YEAR(a.contract_date) = #{year}

+ 447 - 2
src/main/webapp/static/oss/ossupload.js

@@ -7,7 +7,7 @@ var requestUrl;
 var returnUrl;
 var returnUrl;
 var str;
 var str;
 
 
-function multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt) {
+/*function multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt) {
     console.log("-----------------------start");
     console.log("-----------------------start");
     console.log("-----------------------"+realPath);
     console.log("-----------------------"+realPath);
     requestUrl = realPath+"/a/previewController/getAccess";
     requestUrl = realPath+"/a/previewController/getAccess";
@@ -32,8 +32,452 @@ function multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,upload
         });
         });
         multitest(client, storeAs, file,attachmentId,attachmentFlag,uploadPath.replace('http://gangwan-app.oss-cn-hangzhou.aliyuncs.com', result.AliyunUrl),divId,size, cpt);
         multitest(client, storeAs, file,attachmentId,attachmentFlag,uploadPath.replace('http://gangwan-app.oss-cn-hangzhou.aliyuncs.com', result.AliyunUrl),divId,size, cpt);
     })
     })
+};*/
+function ftlUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt) {
+    console.log("-----------------------start");
+    ftlMultitest(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt);
+};
+
+function multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt) {
+    console.log("-----------------------start");
+    if(cpt == 1)
+        multitestFlag(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,"",prefix);
+    else
+        multitest(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt);
+};
+function multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser) {
+    console.log("-----------------------start");
+    if(cpt == 1)
+        multitestFlag(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser);
+    else
+        multitest(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser);
+};
+
+function fBmultipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser) {
+    console.log("-----------------------start");
+    if(cpt == 1)
+        fBmultitestFlag(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser);
+    else
+        multitest(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser);
+};
+
+
+
+function ftlMultitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt) {
+    var formdata = new FormData();
+    formdata.append("storeAs",storeAs);
+    formdata.append("file",file);
+    var names =  storeAs.split("/");
+    var name = names[names.length-1];
+    var fileLocation = "";
+    var lookUrl = "";
+    //获取文件存储位置(0:本地;1:百度云;2:阿里云)
+    $.ajax({
+        type:"get",
+        url:realPath+"/bos/getFileStorageLocation",
+        success:function(data){
+            fileLocation = data.fileLocation;
+        }
+    });
+    $.ajax({
+        type:'post',
+        url:realPath+"/bos/uploadFtl",
+        data:formdata,
+        contentType: false,
+        processData: false,
+        success:function (data1) {
+            if(data1.code==='1'){
+                returnUrl = realPath+"/sys/workattachment/saveAttachment";
+                var p = Math.floor(1*100);
+                $("#jindutiao"+divId).attr("style","width: "+p+"%");
+                $("#jindutiao"+divId).attr("aria-valuenow",p+"%");
+                $("#baifenbi"+divId).html(p+"%");
+                $("#fileName"+divId).html("上传进度:");
+
+
+                $.ajax({
+                    type:'post',
+                    url:returnUrl,
+                    data:{
+                        "attachmentName":data1.name,
+                        "attachmentId":attachmentId,
+                        "attachmentFlag":attachmentFlag,
+                        "url":data1.url,
+                        "divIdType":divId
+                    },
+                    success:function(data){
+                        console.log('url : ' + data.url);
+                        if(data.status=="Success"){
+                            parent.layer.msg("上传成功!",{icon:1});
+                            var lenght =$(".trIdAdds").length;
+                            if (size != 0){
+                                lenght += size;
+                            }
+                            var addFile = "addFile"+divId;
+                            var str = '<tr class="trIdAdds">'+
+                                '<td class="text-center">' ;
+                            if(2 == fileLocation){
+                                $.ajax({
+                                    type:"post",
+                                    async:false,
+                                    url:realPath+"/workfullmanage/workFullManage/getFileTemporaryLookUrl",
+                                    data:{"file":data.url,},
+                                    success:function(result){
+                                        lookUrl = result.lookUrl;
+                                        if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                            str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                        }else if(isContains("pdf",data.type)){
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                        }else {
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                        }
+                                    }
+                                });
+
+                            }else{
+                                if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                    str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                }else if(isContains("pdf",data.type)){
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                }else {
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                }
+                            }
+                            str = str +'</td>'+
+                                '<td >'+data.createByName+'</td>'+
+                                '<td >'+data.createDate+
+                                '<input name="workAttachments['+lenght+'].id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value=""/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentId" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentId+'"/>'+
+                                '<input name="workAttachments['+lenght+'].url" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data1.url+'"/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentName" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data1.name+'"/>'+
+                                '<input name="workAttachments['+lenght+'].createBy.id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.createBy+'"/>'+
+                                '<input name="workAttachments['+lenght+'].type" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.type+'"/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentFlag" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentFlag+'"/>'+
+                                '<input name="workAttachments['+lenght+'].divIdType" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.divIdType+'"/>'+
+                                '</td>'+
+                                '<td class="op-td">'+
+                                '<div class="op-btn-box">' +
+                                '<a href="'+data1.url+'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>'+
+                                '<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,\''+realPath+'/sys/workattachment/deleteFileFromAliyun?url='+data.url+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+                                '</div>' +
+                                '</td>'+
+                                '</tr>';
+                            console.log("file:"+divId);
+                            console.log("str="+str);
+                            $("#file"+divId).append(str);
+                        }else {
+                            parent.layer.msg("上传失败!",{icon:2});
+                        }
+                    }
+                })
+            }else {
+                parent.layer.msg("上传失败!",{icon:2});
+            }
+        }
+    })
+};
+function fBmultitestFlag (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt,idx,prefix,currentUser) {
+    var formdata = new FormData();
+    formdata.append("storeAs",storeAs);
+    formdata.append("file",file);
+    var names =  storeAs.split("/");
+    var name = names[names.length-1];
+    var fileLocation = "";
+    var lookUrl = "";
+    //获取文件存储位置(0:本地;1:百度云;2:阿里云)
+    $.ajax({
+        type:"get",
+        url:realPath+"/bos/getFileStorageLocation",
+        success:function(data){
+            fileLocation = data.fileLocation;
+        }
+    });
+    $.ajax({
+        type:'post',
+        url:realPath+"/bos/upload",
+        data:formdata,
+        contentType: false,
+        processData: false,
+        success:function (data1) {
+            if(data1.code==='1'){
+                returnUrl = realPath+"/sys/workattachment/saveAttachment";
+                $.ajax({
+                    type:'post',
+                    url:returnUrl,
+                    data:{
+                        "attachmentName":file['name'],
+                        "attachmentId":attachmentId,
+                        "attachmentFlag":attachmentFlag,
+                        "url":data1.url,
+                        "divIdType":divId
+                    },
+                    success:function(data){
+                        console.log('url : ' + data.url);
+                        if(data.status=="Success"){
+                            parent.layer.msg("上传成功!",{icon:1});
+                            var str = '' ;
+                            var addFile = prefix+divId;
+                            if(2 == fileLocation){
+                                $.ajax({
+                                    type:"post",
+                                    async:false,
+                                    url:realPath+"/workfullmanage/workFullManage/getFileTemporaryLookUrl",
+                                    data:{"file":data.url,},
+                                    success:function(result){
+                                        lookUrl = result.lookUrl;
+                                        if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                            str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                        }else if(isContains("pdf",data.type)){
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                        }else {
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                        }
+                                    }
+                                });
+
+                            }else{
+                                if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                    str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                }else if(isContains("pdf",data.type)){
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                }else {
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                }
+                            }
+                            $(prefix).parent().parent().find("td").eq(2).html(str)
+                            $(prefix).parent().parent().find("td").eq(0).find("input").eq(1).val(data.id)
+                            $(prefix).parent().parent().find("td").eq(0).find("input").eq(2).val(data.url)
+                            var d = new Date();
+                            var dateTime=d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate();
+                            var result = '<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>';
+                            var delResult =
+                                '<a href="javascript:void(0)" onclick="accordingBtn(this,\''+prefix+'\')" class=\"op-btn op-btn-edit" ><i class="fa fa-edit"></i>&nbsp;修改</a>';
+                            // $(prefix).parent().parent().find("td").eq(4).append(result)
+                        }else {
+                            parent.layer.msg("上传失败!",{icon:2});
+                        }
+                    }
+                })
+            }else {
+                parent.layer.msg("上传失败!",{icon:2});
+            }
+        }
+    })
+};
+
+function multitestFlag (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt,idx,prefix,currentUser) {
+    var formdata = new FormData();
+    formdata.append("storeAs",storeAs);
+    formdata.append("file",file);
+    var names =  storeAs.split("/");
+    var name = names[names.length-1];
+    var fileLocation = "";
+    var lookUrl = "";
+    //获取文件存储位置(0:本地;1:百度云;2:阿里云)
+    $.ajax({
+        type:"get",
+        url:realPath+"/bos/getFileStorageLocation",
+        success:function(data){
+            fileLocation = data.fileLocation;
+        }
+    });
+    $.ajax({
+        type:'post',
+        url:realPath+"/bos/upload",
+        data:formdata,
+        contentType: false,
+        processData: false,
+        success:function (data1) {
+            if(data1.code==='1'){
+                returnUrl = realPath+"/sys/workattachment/saveAttachment";
+                $.ajax({
+                    type:'post',
+                    url:returnUrl,
+                    data:{
+                        "attachmentName":file['name'],
+                        "attachmentId":attachmentId,
+                        "attachmentFlag":attachmentFlag,
+                        "url":data1.url,
+                        "divIdType":divId
+                    },
+                    success:function(data){
+                        console.log('url : ' + data.url);
+                        if(data.status=="Success"){
+                            parent.layer.msg("上传成功!",{icon:1});
+                            var str = '' ;
+                            var addFile = prefix+divId;
+                            if(2 == fileLocation){
+                                $.ajax({
+                                    type:"post",
+                                    async:false,
+                                    url:realPath+"/workfullmanage/workFullManage/getFileTemporaryLookUrl",
+                                    data:{"file":data.url,},
+                                    success:function(result){
+                                        lookUrl = result.lookUrl;
+                                        if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                            str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                        }else if(isContains("pdf",data.type)){
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                        }else {
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                        }
+                                    }
+                                });
+
+                            }else{
+                                if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                    str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                }else if(isContains("pdf",data.type)){
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                }else {
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                }
+                            }
+                            $(prefix+"_fileTypeDiv").empty();
+                            $(prefix+"_fileTypeDiv").append(str);
+                            $(prefix+"_uploadUserName").html(currentUser);
+                            var d = new Date();
+                            var dateTime=d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate();
+                            $(prefix+"_uploadDate").html(dateTime);
+                            $(prefix+"_fileName").val(data.attachmentName);
+                            $(prefix+"_fileType").val(data.type);
+                            $(prefix+"_fileUrl").val(data.url);
+                            $(prefix+"_fileAttachmentFlag").val(data.attachmentFlag);
+                            $(prefix+"_fileAttachmentId").val(data.attachmentId);
+                            var result = '<a style="margin-top: 10px;" href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>';
+                            var delResult =
+                                '<a href="javascript:void(0)" onclick="accordingBtn(this,\''+prefix+'\')" class=\"op-btn op-btn-edit" ><i class="fa fa-edit"></i>&nbsp;修改</a>';
+                            $(prefix+"_operation").empty();
+                            $(prefix+"_operation").append(delResult);
+                        }else {
+                            parent.layer.msg("上传失败!",{icon:2});
+                        }
+                    }
+                })
+            }else {
+                parent.layer.msg("上传失败!",{icon:2});
+            }
+        }
+    })
 };
 };
 
 
+function multitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt) {
+    var formdata = new FormData();
+    formdata.append("storeAs",storeAs);
+    formdata.append("file",file);
+    var names =  storeAs.split("/");
+    var name = names[names.length-1];
+    var fileLocation = "";
+    var lookUrl = "";
+    //获取文件存储位置(0:本地;1:百度云;2:阿里云)
+    $.ajax({
+        type:"get",
+        url:realPath+"/bos/getFileStorageLocation",
+        success:function(data){
+            fileLocation = data.fileLocation;
+        }
+    });
+    $.ajax({
+        type:'post',
+        url:realPath+"/bos/upload",
+        data:formdata,
+        contentType: false,
+        processData: false,
+        success:function (data1) {
+            if(data1.code==='1'){
+                returnUrl = realPath+"/sys/workattachment/saveAttachment";
+                var p = Math.floor(1*100);
+                $("#jindutiao"+divId).attr("style","width: "+p+"%");
+                $("#jindutiao"+divId).attr("aria-valuenow",p+"%");
+                $("#baifenbi"+divId).html(p+"%");
+                $("#fileName"+divId).html("上传进度:");
+                $.ajax({
+                    type:'post',
+                    url:returnUrl,
+                    async:false,
+                    data:{
+                        "attachmentName":file['name'],
+                        "attachmentId":attachmentId,
+                        "attachmentFlag":attachmentFlag,
+                        "url":data1.url,
+                        "divIdType":divId
+                    },
+                    success:function(data){
+                        // console.log('ajax requst : ' + data.status);
+                        console.log('url : ' + data.url);
+                        if(data.status=="Success"){
+                            parent.layer.msg("上传成功!",{icon:1});
+                            var lenght =$(".trIdAdds").length;
+                            if (size != 0){
+                                lenght += size;
+                            }
+                            var addFile = "addFile"+divId;
+                            var str = '<tr class="trIdAdds">'+
+                                '<td class="text-center">' ;
+                            if(2 == fileLocation){
+                                $.ajax({
+                                    type:"post",
+                                    async:false,
+                                    url:realPath+"/workfullmanage/workFullManage/getFileTemporaryLookUrl",
+                                    data:{"file":data.url,},
+                                    success:function(result){
+                                        lookUrl = result.lookUrl;
+                                        if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                            str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                        }else if(isContains("pdf",data.type)){
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                        }else {
+                                            str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+lookUrl+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                        }
+                                    }
+                                });
+
+                            }else{
+                                if (isContains("jpg,png,gif,bmp,jpeg",data.type)){
+                                    str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
+                                }else if(isContains("pdf",data.type)){
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\',\'1\')">'+data.attachmentName+'</a>';
+                                }else {
+                                    str = str + '<a class="attention-info" href="javascript:void(0)" onclick="preview(\'预览\',\''+data.url+'\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
+                                }
+                            }
+                            str = str +'</td>'+
+                                '<td >'+data.createByName+'</td>'+
+                                '<td >'+data.createDate+
+                                '<input name="workAttachments['+lenght+'].id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value=""/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentId" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentId+'"/>'+
+                                '<input name="workAttachments['+lenght+'].url" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data1.url+'"/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentName" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentName+'"/>'+
+                                '<input name="workAttachments['+lenght+'].createBy.id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.createBy+'"/>'+
+                                '<input name="workAttachments['+lenght+'].type" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.type+'"/>'+
+                                '<input name="workAttachments['+lenght+'].attachmentFlag" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentFlag+'"/>'+
+                                '<input name="workAttachments['+lenght+'].divIdType" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.divIdType+'"/>'+
+                                '</td>'+
+                                '<td class="op-td">'+
+                                '<div class="op-btn-box">' +
+                                '<a href="javascript:location.href=\''+realPath+'/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>'+
+                                //'<a href="'+data1.url+'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>'+
+                                '<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,\''+realPath+'/sys/workattachment/deleteFileFromAliyun?url='+data.url+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+                                '</div>' +
+                                '</td>'+
+                                '</tr>';
+                            console.log("file:"+divId);
+                            console.log("str="+str);
+                            $("#file"+divId).append(str);
+                            $("#flagFile").val(true);
+                        }else {
+                            parent.layer.msg("上传失败!",{icon:2});
+                        }
+                    }
+                })
+            }else {
+                parent.layer.msg("上传失败!",{icon:2});
+            }
+        }
+    })
+};
+
+/*
 function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt) {
 function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt) {
     var names =  storeAs.split("/");
     var names =  storeAs.split("/");
     var name = names[names.length-1];
     var name = names[names.length-1];
@@ -128,7 +572,8 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
         console.log(err);
         console.log(err);
         multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath, size,checkpoint_temp);
         multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath, size,checkpoint_temp);
     });
     });
-};
+};*/
+
 
 
 function isContains(str, substr) {
 function isContains(str, substr) {
     return str.indexOf(substr) >= 0;
     return str.indexOf(substr) >= 0;

+ 6 - 6
src/main/webapp/webpage/include/head.jsp

@@ -88,18 +88,18 @@
         }
         }
         else
         else
         {
         {
-            // document.write('<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"><\/script>');
+             document.write('<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"><\/script>');
             document.write('<script src="${ctxStatic}/bos/node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js"><\/script>');
             document.write('<script src="${ctxStatic}/bos/node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js"><\/script>');
-            <%--document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js"><\/script>');--%>
-            document.write('<script type="text/javascript" src="${ctxStatic}/bos/bosupload.js"><\/script>');
+            document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js"><\/script>');
+            /*document.write('<script type="text/javascript" src="${ctxStatic}/bos/bosupload.js"><\/script>');*/
         }
         }
     }
     }
     else
     else
     {
     {
-        // document.write('<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"><\/script>');
+         document.write('<script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"><\/script>');
         document.write('<script src="${ctxStatic}/bos/node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js"><\/script>');
         document.write('<script src="${ctxStatic}/bos/node_modules/@baiducloud/sdk/dist/baidubce-sdk.bundle.min.js"><\/script>');
-        <%--document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js"><\/script>');--%>
-        document.write('<script type="text/javascript" src="${ctxStatic}/bos/bosupload.js"><\/script>');
+        document.write('<script type="text/javascript" src="${ctxStatic}/oss/ossupload.js"><\/script>');
+        /*document.write('<script type="text/javascript" src="${ctxStatic}/bos/bosupload.js"><\/script>');*/
     }
     }
 
 
     jQuery.validator.addMethod("isPhone", function(value, element) {
     jQuery.validator.addMethod("isPhone", function(value, element) {

+ 3 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectReport/cost/ruralCostProjectReportList.jsp

@@ -205,11 +205,12 @@
 				,{field:'projectId', align:'center',minWidth:110,title: '项目编号'}
 				,{field:'projectId', align:'center',minWidth:110,title: '项目编号'}
 				,{field:'reportNum',align:'center',minWidth:150, title: '报告号'}
 				,{field:'reportNum',align:'center',minWidth:150, title: '报告号'}
 				,{field:'filesNum',align:'center',minWidth:150, title: '案卷号'}
 				,{field:'filesNum',align:'center',minWidth:150, title: '案卷号'}
-				,{field:'areaName',align:'center', title: '项目所在地'}
+				,{field:'areaName',align:'center',width:90, title: '项目所在地'}
 				,{field:'reviewFee',align:'center',minWidth:100, title: '送审金额(元)'}
 				,{field:'reviewFee',align:'center',minWidth:100, title: '送审金额(元)'}
 				,{field:'approvalFee',align:'center',minWidth:100, title: '审定金额(元)'}
 				,{field:'approvalFee',align:'center',minWidth:100, title: '审定金额(元)'}
 				,{field:'verifyFee',align:'center',minWidth:120, title: '核增核减额(元)'}
 				,{field:'verifyFee',align:'center',minWidth:120, title: '核增核减额(元)'}
 				,{field:'verifyRate',align:'center',minWidth:120, title: '核增核减率(%)'}
 				,{field:'verifyRate',align:'center',minWidth:120, title: '核增核减率(%)'}
+				,{field:'allMoney',align:'center',minWidth:120, title: '汇总项目开票额'}
 				,{field:'principalUser',align:'center', title: '项目负责人'}
 				,{field:'principalUser',align:'center', title: '项目负责人'}
 				,{field:'officeName',align:'center', title: '所属部门'}
 				,{field:'officeName',align:'center', title: '所属部门'}
 				,{align:'center', title: '上报状态',  width:90,templet:function(d){
 				,{align:'center', title: '上报状态',  width:90,templet:function(d){
@@ -244,6 +245,7 @@
 					,"principalUser":"${ruralProjectReportInfo.principalUser}"
 					,"principalUser":"${ruralProjectReportInfo.principalUser}"
 					,"officeName":"${ruralProjectReportInfo.officeName}"
 					,"officeName":"${ruralProjectReportInfo.officeName}"
 					,"reportedState":"${ruralProjectReportInfo.reportedState}"
 					,"reportedState":"${ruralProjectReportInfo.reportedState}"
+					,"allMoney":"${ruralProjectReportInfo.allMoney}"
 					,"reportedProcessInstanceId":"${ruralProjectReportInfo.reportedProcessInstanceId}"
 					,"reportedProcessInstanceId":"${ruralProjectReportInfo.reportedProcessInstanceId}"
 					<shiro:hasPermission name="ruralProject:ruralProjectView:view">
 					<shiro:hasPermission name="ruralProject:ruralProjectView:view">
 					,"showView":1
 					,"showView":1

+ 3 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectReport/ruralProjectReportList.jsp

@@ -205,11 +205,12 @@
 				,{field:'projectId', align:'center',minWidth:110,title: '项目编号'}
 				,{field:'projectId', align:'center',minWidth:110,title: '项目编号'}
 				,{field:'reportNum',align:'center',minWidth:150, title: '报告号'}
 				,{field:'reportNum',align:'center',minWidth:150, title: '报告号'}
 				,{field:'filesNum',align:'center',minWidth:150, title: '案卷号'}
 				,{field:'filesNum',align:'center',minWidth:150, title: '案卷号'}
-				,{field:'areaName',align:'center', title: '项目所在地'}
+				,{field:'areaName',align:'center',width:90, title: '项目所在地'}
 				,{field:'reviewFee',align:'center',minWidth:100, title: '送审金额(元)'}
 				,{field:'reviewFee',align:'center',minWidth:100, title: '送审金额(元)'}
 				,{field:'approvalFee',align:'center',minWidth:100, title: '审定金额(元)'}
 				,{field:'approvalFee',align:'center',minWidth:100, title: '审定金额(元)'}
 				,{field:'verifyFee',align:'center',minWidth:120, title: '核增核减额(元)'}
 				,{field:'verifyFee',align:'center',minWidth:120, title: '核增核减额(元)'}
 				,{field:'verifyRate',align:'center',minWidth:120, title: '核增核减率(%)'}
 				,{field:'verifyRate',align:'center',minWidth:120, title: '核增核减率(%)'}
+				,{field:'allMoney',align:'center',minWidth:120, title: '汇总项目开票额'}
 				,{field:'principalUser',align:'center', title: '项目负责人'}
 				,{field:'principalUser',align:'center', title: '项目负责人'}
 				,{field:'officeName',align:'center', title: '所属部门'}
 				,{field:'officeName',align:'center', title: '所属部门'}
 				,{align:'center', title: '上报状态',  width:90,templet:function(d){
 				,{align:'center', title: '上报状态',  width:90,templet:function(d){
@@ -244,6 +245,7 @@
 					,"principalUser":"${ruralProjectReportInfo.principalUser}"
 					,"principalUser":"${ruralProjectReportInfo.principalUser}"
 					,"officeName":"${ruralProjectReportInfo.officeName}"
 					,"officeName":"${ruralProjectReportInfo.officeName}"
 					,"reportedState":"${ruralProjectReportInfo.reportedState}"
 					,"reportedState":"${ruralProjectReportInfo.reportedState}"
+					,"allMoney":"${ruralProjectReportInfo.allMoney}"
 					,"reportedProcessInstanceId":"${ruralProjectReportInfo.reportedProcessInstanceId}"
 					,"reportedProcessInstanceId":"${ruralProjectReportInfo.reportedProcessInstanceId}"
 					<shiro:hasPermission name="ruralProject:ruralProjectView:view">
 					<shiro:hasPermission name="ruralProject:ruralProjectView:view">
 					,"showView":1
 					,"showView":1

+ 33 - 6
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp

@@ -804,31 +804,58 @@
 									<tbody id="file_attachment">
 									<tbody id="file_attachment">
 									<c:forEach items="${workContractInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
 									<c:forEach items="${workContractInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
 										<tr>
 										<tr>
+											
 												<%-- <td>${status.index + 1}</td>--%>
 												<%-- <td>${status.index + 1}</td>--%>
 											<c:choose>
 											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+												<c:when test="${workContractInfo.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+															<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
 												</c:when>
 												</c:when>
 												<c:otherwise>
 												<c:otherwise>
 													<c:choose>
 													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+															<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
 														</c:when>
 														</c:when>
 														<c:otherwise>
 														<c:otherwise>
-															<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
 														</c:otherwise>
 														</c:otherwise>
 													</c:choose>
 													</c:choose>
 												</c:otherwise>
 												</c:otherwise>
 											</c:choose>
 											</c:choose>
+
 											<td>${workClientAttachment.createBy.name}</td>
 											<td>${workClientAttachment.createBy.name}</td>
 											<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
 											<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
 											<td class="op-td">
 											<td class="op-td">
 												<div class="op-btn-box" >
 												<div class="op-btn-box" >
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
 													<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
 													<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
 														<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
 														<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
 													</c:if>
 													</c:if>

+ 11 - 0
src/main/webapp/webpage/modules/workcontractinfo/workContractListInfoList.jsp

@@ -151,6 +151,13 @@
 							</form:select>
 							</form:select>
 						</div>
 						</div>
 					</div>
 					</div>
+
+					<div class="layui-item query athird">
+						<label class="layui-form-label">合同规模:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="contractPrice" htmlEscape="false" maxlength="255"  class=" form-control number layui-input"/>
+						</div>
+					</div>
 					<div class="layui-item query athird">
 					<div class="layui-item query athird">
 						<label class="layui-form-label">登记人:</label>
 						<label class="layui-form-label">登记人:</label>
 						<div class="layui-input-block  with-icon">
 						<div class="layui-input-block  with-icon">
@@ -247,6 +254,9 @@
 				,{field:'contractTypeDoc', align:'center',title: '合同类型', width:120,templet:function(d){
 				,{field:'contractTypeDoc', align:'center',title: '合同类型', width:120,templet:function(d){
 						return "<span title='"+ d.contractTypeDoc +"'>" + d.contractTypeDoc + "</span>";
 						return "<span title='"+ d.contractTypeDoc +"'>" + d.contractTypeDoc + "</span>";
 					}}
 					}}
+				,{field:'contractPrice', align:'center',title: '合同规模', width:120,templet:function(d){
+						return "<span title='"+ d.contractPrice +"'>" + d.contractPrice + "</span>";
+					}}
 				,{field:'contractDate',align:'center', title: '签订日期',minWidth:160,templet:function(d){
 				,{field:'contractDate',align:'center', title: '签订日期',minWidth:160,templet:function(d){
 						return "<span title='"+ d.contractDate +"'>" + d.contractDate + "</span>";
 						return "<span title='"+ d.contractDate +"'>" + d.contractDate + "</span>";
 					}}
 					}}
@@ -376,6 +386,7 @@
                     ,"status":"${workContractListInfo.contractState}"
                     ,"status":"${workContractListInfo.contractState}"
                     ,"borrowStatus":"${workContractListInfo.borrowStatus}"
                     ,"borrowStatus":"${workContractListInfo.borrowStatus}"
                     ,"giveStatus":"${workContractListInfo.giveStatus}"
                     ,"giveStatus":"${workContractListInfo.giveStatus}"
+                    ,"contractPrice":"${workContractListInfo.contractPrice}"
                 }
                 }
                 </c:forEach>
                 </c:forEach>
                 </c:if>
                 </c:if>