销售出货拣货上传附件功能
This commit is contained in:
parent
621cf75c71
commit
f584c9b3b1
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mom.wms.dto;
|
||||
|
||||
|
||||
import com.foreverwin.mom.wms.entity.Document;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* @author Snow
|
||||
* @date 2024-12-29
|
||||
*/
|
||||
@Data
|
||||
public class DocumentDto extends Document {
|
||||
|
||||
private MultipartFile file;
|
||||
|
||||
private String fileName;
|
||||
}
|
||||
@ -909,6 +909,19 @@ public class DocumentController {
|
||||
documentService.submitDocumentTBC(site, user, dto.getStr());
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 单据提交含附件
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "单据提交含附件", notes = "单据提交含附件")
|
||||
@SysLog("单据提交含附件")
|
||||
@PostMapping("/submitDocumentWithFile")
|
||||
public R submitDocumentWithFile(DocumentDto dto) {
|
||||
return R.ok(documentService.submitDocumentWithFile(dto));
|
||||
}
|
||||
//-----------------------------------------------------------------------------------
|
||||
//出库
|
||||
@ApiOperation(value = "采购退货过账", notes = "采购退货过账")
|
||||
|
||||
@ -392,4 +392,6 @@ public interface DocumentService extends IService<Document> {
|
||||
|
||||
// 采购到货拆批-单据号查询
|
||||
List<DocumentDetailed> getDocumentDetail2(String documentNo, String targetWarehouse);
|
||||
|
||||
List<Document> submitDocumentWithFile(DocumentDto dto);
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.foreverwin.mom.wms.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -64,6 +66,7 @@ import org.springframework.transaction.support.TransactionCallback;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -127,6 +130,7 @@ public class DocumentServiceImpl extends ServiceImpl<DocumentMapper, Document> i
|
||||
private final RemoteFssm0081Service remoteFssm0081Service;
|
||||
private final RemoteFssm0082Service remoteFssm0082Service;
|
||||
private final RemoteMesPostDnService remoteMesPostDnService;
|
||||
private final RemoteEsbFileDealService remoteEsbFileDealService;
|
||||
|
||||
@Autowired
|
||||
private TransactionTemplate transactionTemplate;
|
||||
@ -6540,6 +6544,21 @@ public class DocumentServiceImpl extends ServiceImpl<DocumentMapper, Document> i
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<Document> submitDocumentWithFile(DocumentDto dto){
|
||||
List<Document> documents_ = new ArrayList<>();
|
||||
String documentNo = dto.getDocumentNo();
|
||||
String site = TenantContextHolder.getTenantId();
|
||||
// 获取上传的文件
|
||||
MultipartFile file = dto.getFile();
|
||||
if (file != null) {
|
||||
Map<String, String> resultMap = remoteEsbFileDealService.uploadFileDoExecute(file).getData();
|
||||
}
|
||||
return documents_;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void submitDocumentTBC(String site, String user, String documentNo) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user