|
|
@@ -7,6 +7,7 @@ import com.uas.platform.b2b.model.Attach;
|
|
|
import com.uas.platform.b2b.model.PurchaseOrderAll;
|
|
|
import com.uas.platform.b2b.service.AttachService;
|
|
|
import com.uas.platform.b2b.service.PurchaseOrderService;
|
|
|
+import com.uas.platform.b2b.support.SystemSession;
|
|
|
import com.uas.platform.b2b.support.UsageBufferedLogger;
|
|
|
import com.uas.platform.core.exception.NotFoundException;
|
|
|
import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
@@ -57,7 +58,7 @@ public class FileController {
|
|
|
if(attach == null) {
|
|
|
throw new IllegalArgumentException("附件不存在");
|
|
|
}
|
|
|
- logger.log("附件下载", attach.getName() + "下载", "关联附件id: " + attach.getId());
|
|
|
+ logger.log(SystemSession.getUser().getUserUU(), SystemSession.getUser().getEnterprise().getUu(), "附件下载", attach.getName() + "下载", "关联附件id: " + attach.getId());
|
|
|
response.addHeader("Content-Disposition", "attachment;filename=" + new String(attach.getName().getBytes("utf-8"), "iso-8859-1"));
|
|
|
response.setCharacterEncoding("utf-8");
|
|
|
response.setContentType("application/octec-stream");
|
|
|
@@ -110,7 +111,7 @@ public class FileController {
|
|
|
StringBuffer idString = null;
|
|
|
String url = null;
|
|
|
if (!CollectionUtils.isEmpty(attaches)) {
|
|
|
- logger.log("附件下载", "采购单附件批量下载", "关联订单id: " + id);
|
|
|
+ logger.log(SystemSession.getUser().getUserUU(), SystemSession.getUser().getEnterprise().getUu(),"附件下载", "采购单附件批量下载", "关联订单id: " + id);
|
|
|
for (Attach attach : attaches) {
|
|
|
if (attach.getPath().startsWith("http://dfs.ubtob.com")) {// 存储在dfs存储服务器,去dfs存储服务器下载
|
|
|
// TODO dfs服务器上打包下载
|