|
|
@ -41,7 +41,6 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.tomcat.util.threads.ThreadPoolExecutor; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.InputStream; |
|
|
@ -93,7 +92,7 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
|
@Autowired |
|
|
|
private BaseVehicleFeign baseVehicleFeign; |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
// @Transactional(rollbackFor = Exception.class)
|
|
|
|
public ResultBean<List<BusHandoverListVo>> saveDeliverybill(BusHandoverDto dto) { |
|
|
|
ResultBean<List<BusHandoverListVo>> rb = ResultBean.fireFail(); |
|
|
|
//ToDo:验证是否包含已存在的车辆
|
|
|
@ -498,28 +497,37 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
|
List<DownloadVo> stringList = new ArrayList<>(); |
|
|
|
DownloadVo vo = new DownloadVo(); |
|
|
|
BuscenterFile buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.RECEIVE_CAR.getAttachType()); |
|
|
|
vo.setName(buscenterFile.getFileName()); |
|
|
|
vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
stringList.add(vo); |
|
|
|
if(buscenterFile != null){ |
|
|
|
vo.setName(buscenterFile.getFileName()); |
|
|
|
vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
stringList.add(vo); |
|
|
|
} |
|
|
|
|
|
|
|
vo = new DownloadVo(); |
|
|
|
buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.ENTRUST_CONFIRM.getAttachType()); |
|
|
|
vo.setName(buscenterFile.getFileName()); |
|
|
|
vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
stringList.add(vo); |
|
|
|
if (!record.getCustomerName().equals(record.getRecipient())) { |
|
|
|
vo = new DownloadVo(); |
|
|
|
buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.ENTRUST.getAttachType()); |
|
|
|
if(buscenterFile != null){ |
|
|
|
vo.setName(buscenterFile.getFileName()); |
|
|
|
vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
stringList.add(vo); |
|
|
|
} |
|
|
|
|
|
|
|
if (!record.getCustomerName().equals(record.getRecipient())) { |
|
|
|
vo = new DownloadVo(); |
|
|
|
buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.ENTRUST.getAttachType()); |
|
|
|
if(buscenterFile != null){ |
|
|
|
vo.setName(buscenterFile.getFileName()); |
|
|
|
vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
stringList.add(vo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
vo = new DownloadVo(); |
|
|
|
buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.EXIT_TICKET.getAttachType()); |
|
|
|
vo.setName(buscenterFile.getFileName()); |
|
|
|
vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
stringList.add(vo); |
|
|
|
|
|
|
|
if(buscenterFile != null){ |
|
|
|
vo.setName(buscenterFile.getFileName()); |
|
|
|
vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); |
|
|
|
stringList.add(vo); |
|
|
|
} |
|
|
|
record.setFileResps(stringList); |
|
|
|
|
|
|
|
} |
|
|
|