This commit is contained in:
parent
ba1ad4b4df
commit
e24e9d36b6
|
|
@ -32,6 +32,7 @@ import org.springframework.http.HttpStatus;
|
|||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
|
@ -190,6 +191,9 @@ public class OrderController extends BaseController {
|
|||
bmContract.setStatus(1);
|
||||
bmContract.setOwnerCom(orderInfoDto.getCompanyId().longValue());
|
||||
List<BmContract> list = bmContractService.getContractUrl(bmContract);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return AjaxResult.error("请先上传合同");
|
||||
}
|
||||
String wordUrl = list.get(0).getBmFileInfoList().get(0).getFileUrl();
|
||||
InputStream inputStream = new URL(wordUrl).openStream();
|
||||
|
||||
|
|
@ -258,6 +262,9 @@ public class OrderController extends BaseController {
|
|||
bmContract.setStatus(1);
|
||||
bmContract.setOwnerCom(orderInfoDto.getCompanyId().longValue());
|
||||
List<BmContract> list = bmContractService.getContractUrl(bmContract);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return AjaxResult.error("请先上传合同");
|
||||
}
|
||||
String wordUrl = list.get(0).getBmFileInfoList().get(0).getFileUrl();
|
||||
InputStream inputStream = new URL(wordUrl).openStream();
|
||||
XWPFDocument document = new XWPFDocument(inputStream);
|
||||
|
|
@ -271,7 +278,7 @@ public class OrderController extends BaseController {
|
|||
//订单金额
|
||||
replacements.put("${cost}", orderInfoDto.getCost().toString());
|
||||
//订单详情
|
||||
StrBuilder orderDetail = new StrBuilder();
|
||||
StringBuilder orderDetail = new StringBuilder();
|
||||
List<OrderDetailDto> detailsList = orderInfoDto.getDetailsList();
|
||||
for (OrderDetailDto orderDetailDto : detailsList) {
|
||||
Date rentBeginTime = inputFormat.parse(orderDetailDto.getRentBeginTime().toString());
|
||||
|
|
|
|||
Loading…
Reference in New Issue