|
|
@ -59,6 +59,7 @@ import com.yxt.anrui.flowable.api.sysformlink.SysFormLinkFeign; |
|
|
|
import com.yxt.anrui.flowable.api.sysformlink.SysFormLinkTypeEnum; |
|
|
|
import com.yxt.anrui.flowable.api.utils.ProcDefEnum; |
|
|
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
|
|
|
import com.yxt.anrui.portal.api.flow.PCHistTaskListAndCommentList; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
@ -73,15 +74,17 @@ import com.yxt.common.base.config.component.DocPdfComponent; |
|
|
|
import com.yxt.common.base.config.component.FileUploadComponent; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.Base64; |
|
|
|
import com.yxt.common.base.utils.PagerUtil; |
|
|
|
import com.yxt.common.base.utils.TransformMoney; |
|
|
|
import com.yxt.common.base.utils.WordConvertUtils; |
|
|
|
import com.yxt.common.base.utils.*; |
|
|
|
import com.yxt.common.core.query.PagerQuery; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import com.yxt.common.core.vo.PagerVo; |
|
|
|
import com.yxt.messagecenter.api.message.Message; |
|
|
|
import com.yxt.messagecenter.api.message.MessageFeign; |
|
|
|
import com.yxt.messagecenter.api.message.MessageFlowVo; |
|
|
|
import com.yxt.messagecenter.api.message.MessageFlowableQuery; |
|
|
|
import com.yxt.messagecenter.api.messagelist.MessageList; |
|
|
|
import com.yxt.messagecenter.api.messagelist.MessageListFeign; |
|
|
|
import org.apache.commons.collections4.comparators.NullComparator; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -195,6 +198,11 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
private BusSalesOrderVehicleService busSalesOrderVehicleService; |
|
|
|
@Autowired |
|
|
|
private LoanSolutionsFeign loanSolutionsFeign; |
|
|
|
@Autowired |
|
|
|
private com.yxt.anrui.portal.api.flow.FlowableFeign flowableFeignPro; |
|
|
|
@Autowired |
|
|
|
private MessageListFeign messageListFeign; |
|
|
|
private static final NullComparator<String> nullComparator = new NullComparator<>(); |
|
|
|
|
|
|
|
/** |
|
|
|
* 欠款提车分页列表查询条件 |
|
|
@ -641,9 +649,9 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
log.error("获取销售订单详情出错啦!!!"); |
|
|
|
} |
|
|
|
if(resultBean.getData().isFinState()){ |
|
|
|
if (resultBean.getData().isFinState()) { |
|
|
|
appArrearsCarryInfoVo.setFinType(false); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
appArrearsCarryInfoVo.setFinType(true); |
|
|
|
} |
|
|
|
appArrearsCarryInfoVo.setBusSalesOrderSid(resultBean.getData().getBusSalesOrderSid()); |
|
|
@ -1355,12 +1363,12 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
BigDecimal sqMoney = BigDecimal.ZERO; |
|
|
|
//已付车款
|
|
|
|
List<String> vinSidList = vinList.stream().map(v -> v.getCarSid()).collect(Collectors.toList()); |
|
|
|
List<String> busVinSidList = busSalesOrderVehicleService.selectByVinSidAndContractNo(vinSidList,dto.getContractId()); |
|
|
|
ResultBean<String> subscribtAllResultBean = finCollectionConfirmationFeign.selectCollectionMoneys(dto.getContractId(),busVinSidList); |
|
|
|
List<String> busVinSidList = busSalesOrderVehicleService.selectByVinSidAndContractNo(vinSidList, dto.getContractId()); |
|
|
|
ResultBean<String> subscribtAllResultBean = finCollectionConfirmationFeign.selectCollectionMoneys(dto.getContractId(), busVinSidList); |
|
|
|
if (subscribtAllResultBean.getData() != null) { |
|
|
|
map.put("YMoney", subscribtAllResultBean.getData()); |
|
|
|
sqMoney = wMoneyAll.subtract(new BigDecimal(subscribtAllResultBean.getData())); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
map.put("YMoney", BigDecimal.ZERO); |
|
|
|
sqMoney = wMoneyAll.subtract(BigDecimal.ZERO); |
|
|
|
} |
|
|
@ -2217,7 +2225,7 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
BusArrearsCarryVehicleApply busArrearsCarryVehicleApply = fetchBySid(query.getBusinessSid()); |
|
|
|
String businessTaskId = busArrearsCarryVehicleApply.getTaskId(); |
|
|
|
if (StringUtils.isNotBlank(businessTaskId)) { |
|
|
|
if(query.getUserSid().equals(busArrearsCarryVehicleApply.getCreateBySid())){ |
|
|
|
if (query.getUserSid().equals(busArrearsCarryVehicleApply.getCreateBySid())) { |
|
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
|
|
@ -2227,7 +2235,7 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
baseVehicleTempstateFeign.delByBusSid(busArrearsCarryVehicleApply.getSid()); |
|
|
|
return rb.success().setData(resultBean.getData()); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
if (businessTaskId.equals(query.getTaskId())) { |
|
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
@ -2298,9 +2306,9 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
log.error("获取销售订单详情出错啦!!!"); |
|
|
|
} |
|
|
|
appArrearsCarryInfoVo.setBusSalesOrderSid(resultBean.getData().getBusSalesOrderSid()); |
|
|
|
if(resultBean.getData().isFinState()){ |
|
|
|
if (resultBean.getData().isFinState()) { |
|
|
|
appArrearsCarryInfoVo.setFinType(false); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
appArrearsCarryInfoVo.setFinType(true); |
|
|
|
} |
|
|
|
appArrearsCarryInfoVo.setContractId(busArrearsCarryVehicleApply.getContractNo()); |
|
|
@ -2453,106 +2461,213 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
AppArrearsCarryDto dto = new AppArrearsCarryDto(); |
|
|
|
//根据sid查询欠款提车数据
|
|
|
|
BusArrearsCarryVehicleApply busArrearsCarryVehicleApply = fetchBySid(sid); |
|
|
|
BeanUtil.copyProperties(busArrearsCarryVehicleApply,dto,"sid"); |
|
|
|
BeanUtil.copyProperties(busArrearsCarryVehicleApply, dto, "sid"); |
|
|
|
List<AdCarListVo> adCarListVoList = busArrearsCarryVehicleDetailsService.selectByApplySidVehicle(sid); |
|
|
|
dto.setVinList(adCarListVoList); |
|
|
|
dto.setContractId(busArrearsCarryVehicleApply.getContractNo()); |
|
|
|
CreatePdfVo createPdf = createPdf(dto); |
|
|
|
String url = docPdfComponent.getPrefixTemplateUrl()+createPdf.getAllDownloadUrl(); |
|
|
|
String url = docPdfComponent.getPrefixTemplateUrl() + createPdf.getAllDownloadUrl(); |
|
|
|
return rb.success().setData(url); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<String> printApplyPdf(String sid) { |
|
|
|
ResultBean<String> rb = ResultBean.fireFail(); |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
ResultBean<AppArrearsCarryInfoVo> resultBean = details(sid); |
|
|
|
if(!resultBean.getSuccess()){ |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
/* ResultBean<AppArrearsCarryInfoVo> resultBean = details(sid); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
}*/ |
|
|
|
List<String> photoList = new ArrayList<>(); |
|
|
|
BusArrearsCarryVehicleApply busArrearsCarryVehicleApply = fetchBySid(sid); |
|
|
|
AppArrearsCarryInfoVo appArrearsCarryInfoVo = resultBean.getData(); |
|
|
|
map.put("applyName",appArrearsCarryInfoVo.getApplyName()); |
|
|
|
map.put("applyDept",appArrearsCarryInfoVo.getApplyDept()); |
|
|
|
map.put("createDate",appArrearsCarryInfoVo.getCreateDate()); |
|
|
|
map.put("staffName",appArrearsCarryInfoVo.getStaffName()); |
|
|
|
map.put("staffDeptName",appArrearsCarryInfoVo.getStaffDept()); |
|
|
|
map.put("paymentMethod",appArrearsCarryInfoVo.getPaymentMethod()); |
|
|
|
map.put("contractId",appArrearsCarryInfoVo.getContractId()); |
|
|
|
map.put("openTickName",appArrearsCarryInfoVo.getOpenTickName()); |
|
|
|
map.put("customerName",appArrearsCarryInfoVo.getCustomerName()); |
|
|
|
map.put("modelName",appArrearsCarryInfoVo.getModelName()); |
|
|
|
if("0".equals(appArrearsCarryInfoVo.getIsFinance())){ |
|
|
|
map.put("isFinance","否"); |
|
|
|
}else{ |
|
|
|
map.put("isFinance","是"); |
|
|
|
} |
|
|
|
List<AdCarListVo> adCarListVoList = appArrearsCarryInfoVo.getVinList(); |
|
|
|
map.put("adCarListVoList",adCarListVoList); |
|
|
|
map.put("reasonValue",appArrearsCarryInfoVo.getReasonValue()); |
|
|
|
map.put("reason",appArrearsCarryInfoVo.getReason()); |
|
|
|
map.put("contractMoney",appArrearsCarryInfoVo.getContractMoney()); |
|
|
|
map.put("contractCollectionMoney",appArrearsCarryInfoVo.getContractCollectionMoney()); |
|
|
|
map.put("commitmentMoneyDate",appArrearsCarryInfoVo.getCommitmentMoneyDate()); |
|
|
|
// AppArrearsCarryInfoVo appArrearsCarryInfoVo = resultBean.getData();
|
|
|
|
map.put("applyName", busArrearsCarryVehicleApply.getApplyName()); |
|
|
|
map.put("applyDept", busArrearsCarryVehicleApply.getApplyDept()); |
|
|
|
map.put("createDate", DateUtil.format(busArrearsCarryVehicleApply.getCreateTime(), "yyyy-MM-dd")); |
|
|
|
map.put("staffName", busArrearsCarryVehicleApply.getStaffName()); |
|
|
|
map.put("staffDeptName", busArrearsCarryVehicleApply.getStaffDept()); |
|
|
|
map.put("paymentMethod", busArrearsCarryVehicleApply.getPaymentMethod()); |
|
|
|
map.put("contractId", busArrearsCarryVehicleApply.getContractNo()); |
|
|
|
map.put("openTickName", busArrearsCarryVehicleApply.getOpenTickName()); |
|
|
|
map.put("customerName", busArrearsCarryVehicleApply.getCustomerName()); |
|
|
|
map.put("modelName", busArrearsCarryVehicleApply.getModelName()); |
|
|
|
if ("0".equals(busArrearsCarryVehicleApply.getIsFinance())) { |
|
|
|
map.put("isFinance", "否"); |
|
|
|
} else { |
|
|
|
map.put("isFinance", "是"); |
|
|
|
} |
|
|
|
List<BusArrearsCarryVehicleDetails> detailsList = busArrearsCarryVehicleDetailsService.selectDetailsByApplySid(sid); |
|
|
|
List<AdCarListVo> voList = new ArrayList<>(); |
|
|
|
detailsList.removeAll(Collections.singleton(null)); |
|
|
|
if (!detailsList.isEmpty()) { |
|
|
|
for (int i = 0; i < detailsList.size(); i++) { |
|
|
|
AdCarListVo adCarListVo = new AdCarListVo(); |
|
|
|
BeanUtil.copyProperties(detailsList.get(i), adCarListVo); |
|
|
|
adCarListVo.setCarSid(detailsList.get(i).getVinSid()); |
|
|
|
adCarListVo.setVin(detailsList.get(i).getVinNo()); |
|
|
|
voList.add(adCarListVo); |
|
|
|
} |
|
|
|
} |
|
|
|
voList.removeAll(Collections.singleton(null)); |
|
|
|
List<GCarListVo> trailersList = new ArrayList<>(); |
|
|
|
if (!voList.isEmpty()) { |
|
|
|
for (int i = 0; i < voList.size(); i++) { |
|
|
|
AdCarListVo adCarListVo = voList.get(i); |
|
|
|
ResultBean<TraliveredVo> voResultBean = baseTrailerFeign.trailerList(adCarListVo.getCarSid(), busArrearsCarryVehicleApply.getContractNo()); |
|
|
|
if (voResultBean.getData() != null) { |
|
|
|
TraliveredVo traliveredVo = baseTrailerFeign.trailerList(adCarListVo.getCarSid(), busArrearsCarryVehicleApply.getContractNo()).getData(); |
|
|
|
List<TrailerVo> trailerVos = traliveredVo.getList(); |
|
|
|
if (!trailerVos.isEmpty()) { |
|
|
|
for (TrailerVo trailerVo : trailerVos) { |
|
|
|
GCarListVo gCarListVo = new GCarListVo(); |
|
|
|
gCarListVo.setVinNo(traliveredVo.getVinNo()); |
|
|
|
gCarListVo.setGcVinNo(trailerVo.getTrailerVinNo()); |
|
|
|
gCarListVo.setPrice(trailerVo.getDealPrice()); |
|
|
|
trailersList.add(gCarListVo); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
trailersList.removeAll(Collections.singleton(null)); |
|
|
|
map.put("tralierList", trailersList); |
|
|
|
map.put("adCarListVoList", voList); |
|
|
|
map.put("reasonValue", busArrearsCarryVehicleApply.getReasonValue()); |
|
|
|
map.put("reason", busArrearsCarryVehicleApply.getReason()); |
|
|
|
map.put("contractMoney", busArrearsCarryVehicleApply.getContractMoney()); |
|
|
|
map.put("contractCollectionMoney", busArrearsCarryVehicleApply.getContractCollectionMoney()); |
|
|
|
map.put("commitmentMoneyDate", busArrearsCarryVehicleApply.getCommitmentMoneyDate()); |
|
|
|
List<String> carContract = Arrays.asList(busArrearsCarryVehicleApply.getCarContractFile().split(",")); |
|
|
|
List<String> carContractList = new ArrayList<>(); |
|
|
|
for (String image : carContract) { |
|
|
|
try { |
|
|
|
image = fileUploadComponent.getUrlPrefix()+URLEncoder.encode(image, "utf-8"); |
|
|
|
image = fileUploadComponent.getUrlPrefix() + URLEncoder.encode(image, "utf-8"); |
|
|
|
String image2Base64 = image2Base64(image); |
|
|
|
carContractList.add(image2Base64); |
|
|
|
photoList.add(image2Base64); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("carContractList",carContractList); |
|
|
|
List<String> guaranteeLetter = Arrays.asList(busArrearsCarryVehicleApply.getGuaranteeLetterFile().split(",")); |
|
|
|
// map.put("carContractList",carContractList);
|
|
|
|
List<String> guaranteeLetter = Arrays.asList(busArrearsCarryVehicleApply.getGuaranteeLetterFile().split(",")); |
|
|
|
List<String> guaranteeLetterList = new ArrayList<>(); |
|
|
|
for (String image : guaranteeLetter) { |
|
|
|
try { |
|
|
|
image = fileUploadComponent.getUrlPrefix()+URLEncoder.encode(image, "utf-8"); |
|
|
|
image = fileUploadComponent.getUrlPrefix() + URLEncoder.encode(image, "utf-8"); |
|
|
|
String image2Base64 = image2Base64(image); |
|
|
|
guaranteeLetterList.add(image2Base64); |
|
|
|
photoList.add(image2Base64); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("guaranteeLetterList",guaranteeLetterList); |
|
|
|
List<String> gdLetter = Arrays.asList(busArrearsCarryVehicleApply.getGdLetterFile().split(",")); |
|
|
|
// map.put("guaranteeLetterList",guaranteeLetterList);
|
|
|
|
List<String> gdLetter = Arrays.asList(busArrearsCarryVehicleApply.getGdLetterFile().split(",")); |
|
|
|
List<String> gdLetterList = new ArrayList<>(); |
|
|
|
for (String image : gdLetter) { |
|
|
|
try { |
|
|
|
image = fileUploadComponent.getUrlPrefix()+URLEncoder.encode(image, "utf-8"); |
|
|
|
image = fileUploadComponent.getUrlPrefix() + URLEncoder.encode(image, "utf-8"); |
|
|
|
String image2Base64 = image2Base64(image); |
|
|
|
gdLetterList.add(image2Base64); |
|
|
|
photoList.add(image2Base64); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("gdLetterList",gdLetterList); |
|
|
|
List<String> zjlLetter = Arrays.asList(busArrearsCarryVehicleApply.getZjlLetterFile().split(",")); |
|
|
|
// map.put("gdLetterList",gdLetterList);
|
|
|
|
List<String> zjlLetter = Arrays.asList(busArrearsCarryVehicleApply.getZjlLetterFile().split(",")); |
|
|
|
List<String> zjlLetterList = new ArrayList<>(); |
|
|
|
for (String image : zjlLetter) { |
|
|
|
try { |
|
|
|
image = fileUploadComponent.getUrlPrefix()+URLEncoder.encode(image, "utf-8"); |
|
|
|
image = fileUploadComponent.getUrlPrefix() + URLEncoder.encode(image, "utf-8"); |
|
|
|
String image2Base64 = image2Base64(image); |
|
|
|
zjlLetterList.add(image2Base64); |
|
|
|
photoList.add(image2Base64); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("zjlLetterList",zjlLetterList); |
|
|
|
List<String> fileList = Arrays.asList(busArrearsCarryVehicleApply.getOtherFile().split(",")); |
|
|
|
// map.put("zjlLetterList",zjlLetterList);
|
|
|
|
List<String> fileList = Arrays.asList(busArrearsCarryVehicleApply.getOtherFile().split(",")); |
|
|
|
List<String> fileListList = new ArrayList<>(); |
|
|
|
for (String image : fileList) { |
|
|
|
try { |
|
|
|
image = fileUploadComponent.getUrlPrefix()+URLEncoder.encode(image, "utf-8"); |
|
|
|
image = fileUploadComponent.getUrlPrefix() + URLEncoder.encode(image, "utf-8"); |
|
|
|
String image2Base64 = image2Base64(image); |
|
|
|
fileListList.add(image2Base64); |
|
|
|
photoList.add(image2Base64); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("fileListList",fileListList); |
|
|
|
// map.put("fileListList",fileListList);
|
|
|
|
//==================================================================
|
|
|
|
//获取审批记录
|
|
|
|
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(busArrearsCarryVehicleApply.getProcInstId(), "1").getData(); |
|
|
|
List<BusArrearsCarryVehicleFlowableVo> busArrearsCarryVehicleFlowableVos = new ArrayList<>(); |
|
|
|
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) { |
|
|
|
if (flowTask.getFlowableRecordVo() != null) { |
|
|
|
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo(); |
|
|
|
BusArrearsCarryVehicleFlowableVo busArrearsCarryVehicleFlowableVo = new BusArrearsCarryVehicleFlowableVo(); |
|
|
|
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos"); |
|
|
|
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment"); |
|
|
|
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName"); |
|
|
|
String comment1 = (String) comment.get("comment"); |
|
|
|
busArrearsCarryVehicleFlowableVo.setName(assigneeName); |
|
|
|
busArrearsCarryVehicleFlowableVo.setComment(comment1); |
|
|
|
if(flowableRecordVo.get("finishTime") != null && flowableRecordVo.get("finishTime") != ""){ |
|
|
|
busArrearsCarryVehicleFlowableVo.setSpsj(flowableRecordVo.get("finishTime").toString()); |
|
|
|
}else{ |
|
|
|
busArrearsCarryVehicleFlowableVo.setSpsj(null); |
|
|
|
} |
|
|
|
busArrearsCarryVehicleFlowableVos.add(busArrearsCarryVehicleFlowableVo); |
|
|
|
} else { |
|
|
|
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo(); |
|
|
|
BusArrearsCarryVehicleFlowableVo busArrearsCarryVehicleFlowableVo = new BusArrearsCarryVehicleFlowableVo(); |
|
|
|
busArrearsCarryVehicleFlowableVo.setName(processCommentVo.get("title").toString()); |
|
|
|
busArrearsCarryVehicleFlowableVo.setComment(processCommentVo.get("content").toString()); |
|
|
|
busArrearsCarryVehicleFlowableVo.setSpsj(processCommentVo.get("time").toString()); |
|
|
|
busArrearsCarryVehicleFlowableVos.add(busArrearsCarryVehicleFlowableVo); |
|
|
|
List<String> fileLists = (List) processCommentVo.get("fileList"); |
|
|
|
fileLists.removeAll(Collections.singleton(null)); |
|
|
|
if (fileLists.size() > 0) { |
|
|
|
for (String image : fileLists) { |
|
|
|
if (image.contains(fileUploadComponent.getUrlPrefix())) { |
|
|
|
image = image.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
try { |
|
|
|
image = fileUploadComponent.getUrlPrefix() + URLEncoder.encode(image, "utf-8"); |
|
|
|
String image2Base64 = image2Base64(image); |
|
|
|
photoList.add(image2Base64); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
List<Message> messages = messageFeign.selectByBusinessSid(busArrearsCarryVehicleApply.getSid()).getData(); |
|
|
|
if (messages.size() > 0) { |
|
|
|
for (Message message : messages) { |
|
|
|
BusArrearsCarryVehicleFlowableVo busArrearsCarryVehicleFlowableVo = new BusArrearsCarryVehicleFlowableVo(); |
|
|
|
String receiverNames = ""; |
|
|
|
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData(); |
|
|
|
if (messageLists.size() > 0) { |
|
|
|
for (MessageList messageList : messageLists) { |
|
|
|
receiverNames = receiverNames + messageList.getReceiverName() + ","; |
|
|
|
} |
|
|
|
} |
|
|
|
busArrearsCarryVehicleFlowableVo.setName("系统"); |
|
|
|
busArrearsCarryVehicleFlowableVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(","))); |
|
|
|
busArrearsCarryVehicleFlowableVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
busArrearsCarryVehicleFlowableVos.add(busArrearsCarryVehicleFlowableVo); |
|
|
|
} |
|
|
|
} |
|
|
|
// busArrearsCarryVehicleFlowableVos.sort(comparing(BusArrearsCarryVehicleFlowableVo::getSpsj));
|
|
|
|
// busArrearsCarryVehicleFlowableVos.sort(Comparator.comparing(BusArrearsCarryVehicleFlowableVo::getSpsj, Comparator.nullsLast(LocalDate::compareTo)));
|
|
|
|
// Collections.sort(busArrearsCarryVehicleFlowableVos, Comparator.nullsLast(Comparator.comparing(BusArrearsCarryVehicleFlowableVo::getSpsj)));
|
|
|
|
|
|
|
|
busArrearsCarryVehicleFlowableVos.sort(Comparator.nullsLast(Comparator.comparing(BusArrearsCarryVehicleFlowableVo::getSpsj,nullComparator))); |
|
|
|
map.put("lcList", busArrearsCarryVehicleFlowableVos); |
|
|
|
map.put("photoPath64", photoList); |
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
|
|
|
|
String url = ""; |
|
|
|
String ftl = "qktcApply"; |
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + ftl + ".ftl"); |
|
|
@ -2568,9 +2683,9 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr |
|
|
|
//新生成的word路径
|
|
|
|
String wordPath = targetPath + typeName; |
|
|
|
//生成合同文件名
|
|
|
|
String pdfName = "欠款提车审批单_" +appArrearsCarryInfoVo.getContractId() + ".pdf"; |
|
|
|
String pdfName = "欠款提车审批单_" + busArrearsCarryVehicleApply.getContractNo() + ".pdf"; |
|
|
|
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); |
|
|
|
url = pdfName; |
|
|
|
url = "template/" + pdfName; |
|
|
|
return rb.success().setData(url); |
|
|
|
} |
|
|
|
|
|
|
|