diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busarrearscarryvehicleapply/BusArrearsCarryVehicleFlowableVo.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busarrearscarryvehicleapply/BusArrearsCarryVehicleFlowableVo.java new file mode 100644 index 0000000000..aae82d6324 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busarrearscarryvehicleapply/BusArrearsCarryVehicleFlowableVo.java @@ -0,0 +1,20 @@ +package com.yxt.anrui.buscenter.api.busarrearscarryvehicleapply; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: 流程记录 + * @author: dimengzhe + * @date: 2023/6/1 + **/ +@Data +public class BusArrearsCarryVehicleFlowableVo { + + @ApiModelProperty(value = "审批人姓名") + private String name; + @ApiModelProperty(value = "审批人意见") + private String comment; + @ApiModelProperty(value = "审批时间") + private String spsj; +} diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java index b66950c2ff..bbca8f943f 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java @@ -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 nullComparator = new NullComparator<>(); /** * 欠款提车分页列表查询条件 @@ -641,9 +649,9 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService vinSidList = vinList.stream().map(v -> v.getCarSid()).collect(Collectors.toList()); - List busVinSidList = busSalesOrderVehicleService.selectByVinSidAndContractNo(vinSidList,dto.getContractId()); - ResultBean subscribtAllResultBean = finCollectionConfirmationFeign.selectCollectionMoneys(dto.getContractId(),busVinSidList); + List busVinSidList = busSalesOrderVehicleService.selectByVinSidAndContractNo(vinSidList, dto.getContractId()); + ResultBean 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 resultBean = flowableFeign.breakProcess(flowTaskVo); @@ -2227,7 +2235,7 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService 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 printApplyPdf(String sid) { ResultBean rb = ResultBean.fireFail(); - Map map = new HashMap<>(); - ResultBean resultBean = details(sid); - if(!resultBean.getSuccess()){ - return rb.setMsg(resultBean.getMsg()); - } + Map map = new HashMap<>(); + /* ResultBean resultBean = details(sid); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + }*/ + List 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 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 detailsList = busArrearsCarryVehicleDetailsService.selectDetailsByApplySid(sid); + List 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 trailersList = new ArrayList<>(); + if (!voList.isEmpty()) { + for (int i = 0; i < voList.size(); i++) { + AdCarListVo adCarListVo = voList.get(i); + ResultBean voResultBean = baseTrailerFeign.trailerList(adCarListVo.getCarSid(), busArrearsCarryVehicleApply.getContractNo()); + if (voResultBean.getData() != null) { + TraliveredVo traliveredVo = baseTrailerFeign.trailerList(adCarListVo.getCarSid(), busArrearsCarryVehicleApply.getContractNo()).getData(); + List 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 carContract = Arrays.asList(busArrearsCarryVehicleApply.getCarContractFile().split(",")); List 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 guaranteeLetter = Arrays.asList(busArrearsCarryVehicleApply.getGuaranteeLetterFile().split(",")); +// map.put("carContractList",carContractList); + List guaranteeLetter = Arrays.asList(busArrearsCarryVehicleApply.getGuaranteeLetterFile().split(",")); List 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 gdLetter = Arrays.asList(busArrearsCarryVehicleApply.getGdLetterFile().split(",")); +// map.put("guaranteeLetterList",guaranteeLetterList); + List gdLetter = Arrays.asList(busArrearsCarryVehicleApply.getGdLetterFile().split(",")); List 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 zjlLetter = Arrays.asList(busArrearsCarryVehicleApply.getZjlLetterFile().split(",")); +// map.put("gdLetterList",gdLetterList); + List zjlLetter = Arrays.asList(busArrearsCarryVehicleApply.getZjlLetterFile().split(",")); List 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 fileList = Arrays.asList(busArrearsCarryVehicleApply.getOtherFile().split(",")); +// map.put("zjlLetterList",zjlLetterList); + List fileList = Arrays.asList(busArrearsCarryVehicleApply.getOtherFile().split(",")); List 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 flowRecordVo = flowableFeignPro.flowRecordAndComment(busArrearsCarryVehicleApply.getProcInstId(), "1").getData(); + List busArrearsCarryVehicleFlowableVos = new ArrayList<>(); + for (PCHistTaskListAndCommentList flowTask : flowRecordVo) { + if (flowTask.getFlowableRecordVo() != null) { + Map flowableRecordVo = flowTask.getFlowableRecordVo(); + BusArrearsCarryVehicleFlowableVo busArrearsCarryVehicleFlowableVo = new BusArrearsCarryVehicleFlowableVo(); + List> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos"); + Map 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 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 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 messages = messageFeign.selectByBusinessSid(busArrearsCarryVehicleApply.getSid()).getData(); + if (messages.size() > 0) { + for (Message message : messages) { + BusArrearsCarryVehicleFlowableVo busArrearsCarryVehicleFlowableVo = new BusArrearsCarryVehicleFlowableVo(); + String receiverNames = ""; + List 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孟哲 底 2 0 - 2023-05-31T06:42:00Z - 2023-05-31T06:42:00Z - 3 - 77 - 444 - 3 + 2023-06-01T06:18:00Z + 2023-06-01T06:18:00Z + 1 + 95 + 547 + 4 1 - 520 + 641 16 + + 2052-11.1.0.14309 + 7DB537130C5E4B92A2A3C388DB9C8029_13 + - + @@ -52,12 +56,13 @@ - - - - + + + + + - @@ -85,6 +90,14 @@ + + + + + + + @@ -261,7 +274,6 @@ - @@ -283,9 +295,6 @@ - - - @@ -489,6 +498,7 @@ + @@ -504,7 +514,7 @@ - + @@ -522,18 +532,17 @@ - - + + - - + @@ -541,28 +550,18 @@ - - - - - - - - - - - + + - - + @@ -570,22 +569,12 @@ - - - - - - - - - - @@ -600,10 +589,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -612,13 +634,15 @@ - - - + + - + + + + - + @@ -632,47 +656,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -683,16 +666,9 @@ - - - - - - - @@ -702,14 +678,14 @@ - + - + @@ -718,14 +694,14 @@ - + - + @@ -746,140 +722,255 @@ + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - + + - + + - - + + 欠款提车申请单 - - - - - - - - - - - - - - - + + @@ -892,38 +983,52 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + + + + - + - + - - - + + + + - + - - - + + + + 发起人 @@ -931,50 +1036,55 @@ - - + + - + - + + + + - + - + + + + - - - ${applyName!} - - + + - + - - - + + + + - + - - - + + + + 发起部门 @@ -982,50 +1092,55 @@ - - + + - + - + + + + - + - + + + + - - - ${applyDept!} - - + + - + - - - + + + + - + - - - + + + + 发起日期 @@ -1033,50 +1148,59 @@ - + + - + - + + + + - + - + + + + - - - ${createDate!} - + + + + - + - + - - - + + + + - + - - - + + + + 销售专员 @@ -1084,50 +1208,55 @@ - - + + - + - + + + + - + - + + + + - - - ${staffName!} - - + + - + - - - + + + + - + - - - + + + + 销售部门 @@ -1135,44 +1264,55 @@ - - + + - + - + + + + - + + + + + + + ${staffDeptName!} - - + + - + - - - + + + + - + - - - + + + + 销售类型 @@ -1180,56 +1320,59 @@ - + + - + - + + + + - + - + + + + - - - - - - ${paymentMethod!} - - - - + + + + - + - + - - - + + + + - + - - - + + + + 合同编号 @@ -1237,56 +1380,59 @@ - - + + - + - + + + + - + - + + + + - - - - - - ${contractId!} - - - + + + + + - - + - + - - - + + + + - + - - - + + + + 开票单位 @@ -1294,56 +1440,59 @@ - - + + - + - + + + + - + - + + + + - - - - - - ${openTickName!} - - - + + + + + - - + - + - - - + + + + - + - - - + + + + 客户名称 @@ -1351,56 +1500,59 @@ - + + - + - + + + + - + - + + + + - - - - - - ${customerName!} - - - - + + + + - + - + - - - + + + + - + - - - + + + + 车型 @@ -1408,955 +1560,1357 @@ - - + + - + - + + + + - + - + + + + - - - - - - ${modelName!} - - - + + + + + - - + + - + - + - - - + + + + + - + - - - + + + + - 是否金融部复核 + 车辆信息 + + + + + - + - + - + - + - + + + + - + - + + + + - - - - - - - ${isFinance!} - - - + 序号 - - - + + + - + - + - + + + + + + + + + + + + 车架号 + - - + + + - + - + - + + + + + + + + + + + + 成交价 + - - - - - + + + - + - + - - + + + + - + - - + + + + - 车辆信息 + 平台已收款 - + <#list adCarListVoList as list> + + + + - + + - + - + + + + - + - + + + + - 序号 + ${list_index+1} - - + + + - + - + + + + - + - + + + + - 车架号 + ${list.vin!} - - + + + - + - + + + + - + - + + + + - 成交价 + ${list.price!} - - + + + - + - + + + + - + - + + + + - 平台已收款 + ${list. subscribedAll!} - <#list adCarListVoList as list> - + + <#if (tralierList?size>0) > + + + + - - + + - + - + - + + + + - + - + + + + - - - - ${list_index+1} + 挂车信息 + + + + + - - + + - + - + + + + - + - + + + + - - - - ${list.vin!} + 序号 - - + + - + - + + + + - + - + + + + - - - - ${list.price!} + 挂车车架号 - - + + - + - + + + + - + - + + + + - - - - - - - ${list.subscribedAll!} - - - + 主车车架号 - - - - - + + - + - + + + + - + - + + + + - 欠款提车原因 + 成交价 - + - + - + + + + - + - + + + + - - - - ${reasonValue!} + 平台已收款 + + <#list tralierList as gcList> + + + + - - + + + - + - + + + + - + - + + + + - - - - ${reason!} + ${gcList_index+1} - - - + + + - + - + + + + - + - + + + + - 合同总金额 + ${gcList.vinNo!} - - + + + - + - + + + + - + - + + + + - - - - - - - ${contractMoney!} - - - + ${gcList.gcVinNo!} - + + + - + - + + + + - + - + + + + - 平台收款总金额 + ${gcList.price!} - + + - + - + + + + - + - + + + + - - - - - - - ${contractCollectionMoney!} - - - + ${gcList. subscribedAll!} + + + + + + + - + - + - + - + + + + - + - + + + + - 承诺回款日期 + 欠款提车原因 - + + - + - + - + + + + - + - + + + + - - - - - - - ${commitmentMoneyDate!} - - - + ${reasonValue!} - - - - - + + + - + - - + + + + - + - - + + + + - * - - - - - - - 车辆买卖合同(欠款) + ${reason!} - <#list carContractList as carContract> - + - + - - + + - + + + + + + + + + + + + + + + + + + 合同总金额 + + + + + + + + + + - - + + + + - + - - + + + + - - - - - - - - - - - - - - - - - - - - - ${carContract!} - - - - + ${contractMoney!} - - + - + - - - + + + - + - + - - + + + + - + - - + + + + - * + 平台收款总金额 - + + + + + + + + + + + - - + + + + - 欠款提车担保承诺书 + + + + + + + + + ${contractCollectionMoney!} - <#list guaranteeLetterList as guaranteeLetter> - + - + - - + + - + - + - - + + + + - + - - + + + + - - ${guaranteeLetter!} - - - - + 承诺回款日期 - - - - - - - - - + + + - + - - + + + + - + - - + + + + - 股东会对外担保协议 + ${commitmentMoneyDate!} - <#list gdLetterList as gdLetter> - + - + - - + + + + - + - + - - + + + + - + - - + + + + - - ${gdLetter!} - - - - + 审批流程 - - - - - - + <#list lcList as lc> + <#if (lc_index==0)> - - - + + + + + + + - + - - - + + + + - + - - + + + + - 总经理担保书 + ${lc.comment!} + + + + + + + + + + + + + + + + + + + ${lc.name!} - - <#list zjlLetterList as zjlLetter> - - - - - - + + + + + - + - + - - + + + + - + - - + + + + - - ${zjlLetter!} - - - - + ${lc.spsj!} + + + + + + + + + + + + + + - - + <#list lcList as lc> + <#if (lc_index>0)> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.comment!} + + + + + + + + + + + + + + + + + + + ${lc.name!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.spsj!} + + + + + + + + + + + + + + + + + + + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 下载人 + + + + + + + + + + + + + - + - - + + + + - + - - + + + - 其他附件(含资方信审照片) + ${downName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 下载时间 - - <#list fileListList as fileList> - - - - - - + + + + + + + - + - - + + + + - + - - + + + - - ${fileList!} - - - - + ${downTime!} - - + - - + + + + - + <#list photoPath64 as photo> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${photo!} + + + + + + + + - diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/qktcApplyOld.ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/qktcApply111.ftl similarity index 64% rename from anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/qktcApplyOld.ftl rename to anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/qktcApply111.ftl index bab8c85a97..dcb22f50bc 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/qktcApplyOld.ftl +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/qktcApply111.ftl @@ -32,16 +32,20 @@ 孟哲 底 2 0 - 2023-05-31T06:42:00Z - 2023-05-31T06:42:00Z - 3 - 77 - 444 - 3 + 2023-05-31T10:08:00Z + 2023-05-31T10:08:00Z + 1 + 89 + 509 + 4 1 - 520 + 597 16 + + 2052-11.1.0.14309 + E5FC2BD06CD84C7DA05F5CF206EA9439_12 + @@ -261,7 +265,6 @@ - @@ -283,9 +286,6 @@ - - - @@ -522,18 +522,17 @@ - - + + - - + @@ -541,28 +540,18 @@ - - - - - - - - - - - + + - - + @@ -570,22 +559,12 @@ - - - - - - - - - - @@ -600,23 +579,10 @@ - - - - - - - - - - - - - @@ -631,22 +597,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + @@ -659,7 +639,7 @@ - + @@ -674,9 +654,9 @@ - + - + @@ -691,47 +671,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -746,8 +689,12 @@ + + + + @@ -757,90 +704,163 @@ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - + @@ -863,7 +883,7 @@ 欠款提车申请单 - + @@ -878,8 +898,8 @@ - - + + @@ -892,38 +912,34 @@ - - - - - - - - - - + + + + + + + + + + + + + - + - + - + - - - - - - + - - 发起人 @@ -931,50 +947,40 @@ - + - + - - - - + - + ${applyName!} - - + + - + - - - - - - + - - 发起部门 @@ -982,50 +988,40 @@ - + - + - - - - + - + ${applyDept!} - - + + - + - - - - - - + - - 发起日期 @@ -1033,50 +1029,41 @@ - + + - + - - - - + - + ${createDate!} - + - + - + - - - - - - + - - 销售专员 @@ -1084,50 +1071,40 @@ - + - + - - - - + - + ${staffName!} - - + + - + - - - - - - + - - 销售部门 @@ -1135,44 +1112,34 @@ - + - + - - - - + ${staffDeptName!} - - + + - + - - - - - - + - - 销售类型 @@ -1180,56 +1147,41 @@ - + + - + - - - - + - - - - + ${paymentMethod!} - - - - + - + - + - - - - - - + - - 合同编号 @@ -1237,56 +1189,44 @@ - - + + - + - - - - + - - - - + ${contractId!} - - - + + - - + - + - - - + - - 开票单位 @@ -1294,56 +1234,47 @@ - - + + - + - + - - - - + ${openTickName!} - - - + + - - + - + - - - + - - 客户名称 @@ -1351,56 +1282,44 @@ - + + - + - + - - - - + ${customerName!} - - - - + - + - + - - - - - - + - - 车型 @@ -1408,203 +1327,137 @@ - - + + - + - - - - + - - - - + ${modelName!} - - - - - - - - - - - - - - - - - - - - - - - - - - - 是否金融部复核 - + + - - + + - + - + - + - - - - - - - ${isFinance!} - - - + 车辆信息 + + - - - + + - + - - - - + - - - - - - - - - - + - + 序号 + - - - - - + + + - + - - - - - + - + - - 车辆信息 + 车架号 - - - - + + - + - - - - + - 序号 + 成交价 - - + + - + - - - - + - 车架号 + 平台已收款 + + <#list adCarListVoList as list> + - - + - + @@ -1615,748 +1468,871 @@ - 成交价 + + + + ${list_index+1} - - + + - + - - - - + - 平台已收款 + + + + ${list.vin!} - - <#list adCarListVoList as list> - - - + + - + - - - - + - - ${list_index+1} + + ${list.price!} - - + + - + - - - - + - - ${list.vin!} + + ${list. subscribedAll!} + + + <#if (tralierList?size>0) > + - - + + - + - + - + - - - - ${list.price!} + 挂车信息 + + - + - + - + - - - - - - - ${list.subscribedAll!} - - - + 序号 - - - - - + + - + - + - 欠款提车原因 + 挂车车架号 - + - + - + - - - - ${reasonValue!} + 主车车架号 - - + + - + - + - - - - ${reason!} + 成交价 - - - + - + - + - 合同总金额 + 平台已收款 + + <#list tralierList as gcList> + - + - + - + - - - - - ${contractMoney!} - - - + + ${gcList_index+1} - + + - + - + - 平台收款总金额 + + + + ${gcList.vinNo!} + + + + + + - + - + - + - - + + ${gcList.gcVinNo!} - - ${contractCollectionMoney!} + + - + - - + + - + - - - - - 承诺回款日期 + + ${gcList.price!} - + - + - + - - + + ${gcList.subscribedAll!} - - ${commitmentMoneyDate!} + + - + - + + + - - - + + - + - - - - - + - - - - - - * - - + - - 车辆买卖合同(欠款) + 欠款提车原因 - - <#list carContractList as carContract> - - - - - - + + - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${carContract!} - - - - + + + + ${reasonValue!} - - - - - - - - - + + + - + - - - - - + - - * + - - - - - - 欠款提车担保承诺书 + + ${reason!} - <#list guaranteeLetterList as guaranteeLetter> - - - - + - - + - + - - - - - + - + - - + - - ${guaranteeLetter!} - - - - + 合同总金额 - - - - - - - - - + + + - + - - - - - + - - 股东会对外担保协议 + + + + ${contractMoney!} - <#list gdLetterList as gdLetter> - - - - + - - + - + - + - - + - - + - - ${gdLetter!} - - - - + 平台收款总金额 - - - - - - - - - + + + - + - - + - - 总经理担保书 + + + + ${contractCollectionMoney!} - <#list zjlLetterList as zjlLetter> - - - - + - - + - + - + - - + - - + - - ${zjlLetter!} - - - - + 承诺回款日期 - - - - - - - - - + + + - + - - + - - 其他附件(含资方信审照片) + + + + ${commitmentMoneyDate!} - <#list fileListList as fileList> - - - - + - - - + + + + - + - + - - + + + + - + - - + + + + - - ${fileList!} - - - - + 审批流程 + <#list lcList as lc> + <#if (lc_index==0)> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.comment!} + + + + + + + + + + + + + + + + + + + + ${lc.name!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.spsj!} + + + + + + <#list lcList as lc> + <#if (lc_index>0)> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.comment!} + + + + + + + + + + + + + + + + + + + + ${lc.name!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.spsj!} + + + + + - + <#list photoPath64 as photo> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${photo!} + + + + + - + + - diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationDetailsVo.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationDetailsVo.java index 40a1dfa0f0..3cfec08e7a 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationDetailsVo.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationDetailsVo.java @@ -170,4 +170,6 @@ public class FinBillApplicationDetailsVo extends AppBillApplicationIInfoVo imple private List kpxxqrsApplicationAppendxs; // 开票信息确认书 @ApiModelProperty("车辆登记合同") private List cldjhtApplicationAppendxs; // 车辆登记合同 + @ApiModelProperty("欠款领票附件") + private List arrearsCollectionAppendxs; } \ No newline at end of file diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationDto.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationDto.java index c65cd011f7..5638c52109 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationDto.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationDto.java @@ -163,4 +163,6 @@ public class FinBillApplicationDto implements Dto { private List zjApplicationAppendxs = new ArrayList<>(); @ApiModelProperty("附件") private List fjApplicationAppendxs = new ArrayList<>(); + @ApiModelProperty("欠款领票附件") + private List arrearsCollectionAppendxs = new ArrayList<>(); } \ No newline at end of file diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeign.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeign.java index 15aea71219..51645eba0b 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeign.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeign.java @@ -102,6 +102,11 @@ public interface FinBillApplicationFeign { @ResponseBody public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); + @ApiOperation("生成欠款申请PDF") + @PostMapping("/createPdf") + @ResponseBody + public ResultBean createPdf(@RequestParam("sid") String sid, @RequestParam("userName") String userName); + /*************************公司开票流程管理接口********************************/ @ApiOperation("开票申请审批流程") diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeignFallback.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeignFallback.java index be18e2bef8..8dccb64229 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeignFallback.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeignFallback.java @@ -96,6 +96,11 @@ public class FinBillApplicationFeignFallback implements FinBillApplicationFeign return rb.setMsg("接口anrui-fin/finbillapplication/fetchDetailsBySid无法访问"); } + @Override + public ResultBean createPdf(String sid, String userName) { + return null; + } + /*@Override public ResultBean submitFinBillApplicationPageList(SubmitFinBillApplicationPageListDto dto) { return null; diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationGcListVo.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationGcListVo.java new file mode 100644 index 0000000000..615423b7a7 --- /dev/null +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationGcListVo.java @@ -0,0 +1,44 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.fin.api.finbillapplication; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class FinBillApplicationGcListVo implements Vo { + + @ApiModelProperty(value = "序号") + private Integer idgc; + @ApiModelProperty(value = "挂车车架号") + private String gccjh; + @ApiModelProperty(value = "主车车架号") + private String zccjh; + @ApiModelProperty(value = "开票金额") + private String gckpje; +} diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationSourceLCVo.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationSourceLCVo.java new file mode 100644 index 0000000000..8909aecfae --- /dev/null +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationSourceLCVo.java @@ -0,0 +1,42 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.fin.api.finbillapplication; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class FinBillApplicationSourceLCVo implements Vo { + + @ApiModelProperty(value = "审批人姓名") + private String name; + @ApiModelProperty(value = "审批人意见") + private String comment; + @ApiModelProperty(value = "审批时间") + private String spsj; +} diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationZcListVo.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationZcListVo.java new file mode 100644 index 0000000000..d17688eb55 --- /dev/null +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationZcListVo.java @@ -0,0 +1,48 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.fin.api.finbillapplication; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class FinBillApplicationZcListVo implements Vo { + + @ApiModelProperty(value = "序号") + private Integer idzc; + @ApiModelProperty(value = "车架号") + private String zccjh; + @ApiModelProperty(value = "合格证状态") + private String zchgz; + @ApiModelProperty(value = "开票类型") + private String zckplx; + @ApiModelProperty(value = "开票名称") + private String zckpmc; + @ApiModelProperty(value = "开票信息") + private String zckpxx; +} diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/flowable/FinBillCompleteDto.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/flowable/FinBillCompleteDto.java index 212ab78f63..dc7f4209e1 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/flowable/FinBillCompleteDto.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/flowable/FinBillCompleteDto.java @@ -49,4 +49,6 @@ public class FinBillCompleteDto implements Dto { private List zjApplicationAppendxs = new ArrayList<>(); @ApiModelProperty("附件") private List fjApplicationAppendxs = new ArrayList<>(); + @ApiModelProperty("欠款领票附件") + private List arrearsCollectionAppendxs = new ArrayList<>(); } diff --git a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillfile/FinAttachTypeEnum.java b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillfile/FinAttachTypeEnum.java index 3640c4d1e1..849ef52b2e 100644 --- a/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillfile/FinAttachTypeEnum.java +++ b/anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillfile/FinAttachTypeEnum.java @@ -11,7 +11,8 @@ public enum FinAttachTypeEnum { KPXXQRS("002", "款项确认书"), CLDJHT("003", "车辆登记合同"), ZJ("004", "证件"), - FJ("005", "附件"); + FJ("005", "附件"), + QKLPFJ("006", "欠款领票附件"); /** * 附件类型 diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationRest.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationRest.java index d355439ca0..11060bd058 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationRest.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationRest.java @@ -121,6 +121,11 @@ public class FinBillApplicationRest implements FinBillApplicationFeign { return rb.success().setData(vo); } + @Override + public ResultBean createPdf(String sid, String userName) { + return finBillApplicationService.createPdf(sid,userName); + } + /*@Override public ResultBean submitFinBillApplicationPageList(SubmitFinBillApplicationPageListDto dto) { return finBillApplicationService.submitFinBillApplicationPageList(dto); diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java index 44a0e2c66a..9acaf01550 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java @@ -32,6 +32,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.yxt.anrui.base.api.basedistributor.BaseDistributorFeign; import com.yxt.anrui.base.api.baseinternalpurchase.flow.GetNodeVo; +import com.yxt.anrui.base.api.basemiddleman.BaseMiddlemanDetailsVo; import com.yxt.anrui.base.api.basetrailer.BaseTrailerDetailsVo; import com.yxt.anrui.base.api.basetrailer.BaseTrailerFeign; import com.yxt.anrui.base.api.basetrailer.TrailerVo; @@ -49,8 +50,14 @@ import com.yxt.anrui.base.common.enums.BillTypeEnum; import com.yxt.anrui.base.common.utils.Rule; import com.yxt.anrui.base.common.utils.domain.BillNo; import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; +import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFL; import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; +import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderSourceLCVo; +import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderDiscountListVo; +import com.yxt.anrui.buscenter.api.bussalesorderinsurance.BusSalesOrderInsuranceDetailsVo; +import com.yxt.anrui.buscenter.api.bussalesordermodel.BusSalesOrderModel; import com.yxt.anrui.buscenter.api.bussalesorderprice.BusSalesOrderPrice; +import com.yxt.anrui.buscenter.api.bussalesordersubmit.BusSalesOrderSubmit; import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; @@ -84,30 +91,50 @@ import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo; import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; 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.SysOrganization; import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgVo; import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserVo; import com.yxt.anrui.portal.api.sysuser.UserRoleQuery; +import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDetailsVo; 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.ConstantUtils; import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.WordUtils; 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.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.math.BigDecimal; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLEncoder; import java.util.*; import java.util.stream.Collectors; +import static com.yxt.anrui.fin.biz.finpaymentrecord.FinPaymentrecordService.image2Base64; +import static java.util.Comparator.comparing; + /** * Project: anrui-fin(开票申请管理)
* File: FinBillApplicationService.java
@@ -172,6 +199,10 @@ public class FinBillApplicationService extends MybatisBaseService createQueryWrapper(FinBillApplicationQuery query) { // todo: 这里根据具体业务调整查询条件 @@ -465,35 +496,6 @@ public class FinBillApplicationService extends MybatisBaseService trailerVoList = data.getList(); - for (TrailerVo trailerVo : trailerVoList) { - FinBillTrailerVo finBillTrailerVo = new FinBillTrailerVo(); - finBillTrailerVo.setBillAppSid(sid); - finBillTrailerVo.setVinNo(finBillVehicleVo.getVinNo()); - finBillTrailerVo.setGcVinNo(trailerVo.getTrailerVinNo()); - finBillTrailerVo.setBillTypeKey(finBillVehicleVo.getBillTypeKey()); - finBillTrailerVo.setBillTypeValue(finBillVehicleVo.getBillTypeValue()); - finBillTrailerVo.setOpenTickSid(finBillVehicleVo.getOpenTickSid()); - finBillTrailerVo.setOpenTickName(finBillVehicleVo.getOpenTickName()); - //根据挂车车架号查询挂车信息以及合格证照片路径 - BaseTrailerDetailsVo baseTrailerDetailsVo = baseTrailerFeign.fetchByGcVinNo(trailerVo.getTrailerVinNo()).getData(); - List commonAppendixVos = commonAppendixFeign.selByLinkSid(baseTrailerDetailsVo.getSid()).getData(); - List hgzImageUrls = new ArrayList<>(); - for (CommonAppendixVo commonAppendixVo : commonAppendixVos) { - if (commonAppendixVo.getAttachType().equals("挂车合格证照片")) { - hgzImageUrls.add(commonAppendixVo.getFileUrl()); - } - } - finBillTrailerVo.setHgzImageUrl(hgzImageUrls); - finBillTrailerVos.add(finBillTrailerVo); - } - } - vo.setFinBillTrailers(finBillTrailerVos); - }*/ List khkpsqsApplicationAppendxs = finBillFileService.fetchkhkpsqsBySid(sid); for (FinBillFileVo khkpsqsApplicationAppendx : khkpsqsApplicationAppendxs) { String fileUrl = khkpsqsApplicationAppendx.getFileUrl(); @@ -529,11 +531,19 @@ public class FinBillApplicationService extends MybatisBaseService arrearsCollectionAppendxs = finBillFileService.fetchqklpfjBySid(sid); + for (FinBillFileVo arrearsCollectionAppendx : arrearsCollectionAppendxs) { + String fileUrl = arrearsCollectionAppendx.getFileUrl(); + String urlPrefix = fileUploadComponent.getUrlPrefix(); + fileUrl = urlPrefix + fileUrl; + arrearsCollectionAppendx.setFileUrl(fileUrl); + } vo.setKhkpsqsApplicationAppendxs(khkpsqsApplicationAppendxs); vo.setKpxxqrsApplicationAppendxs(kpxxqrsApplicationAppendxs); vo.setCldjhtApplicationAppendxs(cldjhtApplicationAppendxs); vo.setZjApplicationAppendxs(zjApplicationAppendxs); vo.setFjApplicationAppendxs(fjApplicationAppendxs); + vo.setArrearsCollectionAppendxs(arrearsCollectionAppendxs); return vo; } @@ -621,14 +631,14 @@ public class FinBillApplicationService extends MybatisBaseService kpxxqrsApplicationAppendxs = dto.getKpxxqrsApplicationAppendxs(); List cldjhtApplicationAppendxs = dto.getCldjhtApplicationAppendxs(); List zjApplicationAppendxs = dto.getZjApplicationAppendxs(); + List arrearsCollectionAppendxs = dto.getArrearsCollectionAppendxs(); if (StringUtils.isBlank(dtoSid)) {//新增 FinBillApplication finBillApplication = new FinBillApplication(); BeanUtil.copyProperties(dto, finBillApplication, "sid"); @@ -1544,6 +1555,18 @@ public class FinBillApplicationService extends MybatisBaseService 0) { + for (FinBillFileDto finBillFileDto : arrearsCollectionAppendxs) { + String filePath = finBillFileDto.getFileUrl(); + if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { + filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); + } + finBillFileDto.setFileUrl(filePath); + finBillFileDto.setBillAppSid(finBillApplication.getSid()); + finBillFileDto.setAttachType(FinAttachTypeEnum.QKLPFJ.getAttachType()); + finBillFileService.saveOrUpdateDto(finBillFileDto); + } + } return rb.success().setMsg("保存成功").setData(finBillApplication.getSid()); } FinBillApplication finBillApplication = fetchBySid(dtoSid); @@ -1603,6 +1626,18 @@ public class FinBillApplicationService extends MybatisBaseService 0) { + for (FinBillFileDto finBillFileDto : arrearsCollectionAppendxs) { + String filePath = finBillFileDto.getFileUrl(); + if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { + filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); + } + finBillFileDto.setFileUrl(filePath); + finBillFileDto.setBillAppSid(finBillApplication.getSid()); + finBillFileDto.setAttachType(FinAttachTypeEnum.QKLPFJ.getAttachType()); + finBillFileService.saveOrUpdateDto(finBillFileDto); + } + } finBillVehicleService.delByBillAppSid(dtoSid); for (FinBillVehicleDto finBillVehicleDto : finBillVehicles) { FinBillVehicle finBillVehicle = new FinBillVehicle(); @@ -1919,14 +1954,14 @@ public class FinBillApplicationService extends MybatisBaseService kpxxqrsApplicationAppendxs = query.getKpxxqrsApplicationAppendxs(); List cldjhtApplicationAppendxs = query.getCldjhtApplicationAppendxs(); List zjApplicationAppendxs = query.getZjApplicationAppendxs(); + List arrearsCollectionAppendxs = query.getArrearsCollectionAppendxs(); if (zjApplicationAppendxs.size() == 0) { return rb.setMsg("证件不能为空"); } @@ -2101,6 +2137,18 @@ public class FinBillApplicationService extends MybatisBaseService 0) { + for (FinBillFileDto finBillFileDto : arrearsCollectionAppendxs) { + String filePath = finBillFileDto.getFileUrl(); + if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { + filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); + } + finBillFileDto.setFileUrl(filePath); + finBillFileDto.setBillAppSid(businessSid); + finBillFileDto.setAttachType(FinAttachTypeEnum.QKLPFJ.getAttachType()); + finBillFileService.saveOrUpdateDto(finBillFileDto); + } + } //极光推送 finBillApplication = fetchBySid(businessSid); MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); @@ -2348,7 +2396,8 @@ public class FinBillApplicationService extends MybatisBaseService finBillVehicleVos = finBillVehicleService.fetchByMainSid(sid); String vinNos = ""; for (FinBillVehicleVo finBillVehicleVo : finBillVehicleVos) { - String vinNo = finBillVehicleVo.getVinNo().substring(finBillVehicleVo.getVinNo().length() - 8);; + String vinNo = finBillVehicleVo.getVinNo().substring(finBillVehicleVo.getVinNo().length() - 8); + ; vinNos = vinNos + vinNo + ","; } record.setVinNo(vinNos.substring(0, vinNos.lastIndexOf(","))); @@ -2412,7 +2461,8 @@ public class FinBillApplicationService extends MybatisBaseService finBillVehicleVos = finBillVehicleService.fetchByMainSid(sid); String vinNos = ""; for (FinBillVehicleVo finBillVehicleVo : finBillVehicleVos) { - String vinNo = finBillVehicleVo.getVinNo().substring(finBillVehicleVo.getVinNo().length() - 8);; + String vinNo = finBillVehicleVo.getVinNo().substring(finBillVehicleVo.getVinNo().length() - 8); + ; vinNos = vinNos + vinNo + ","; } record.setVinNo(vinNos.substring(0, vinNos.lastIndexOf(","))); @@ -2432,7 +2482,7 @@ public class FinBillApplicationService extends MybatisBaseService variables = bv.getFormVariables(); + Map variables = bv.getFormVariables(); finBillApplication = fetchBySid(bv.getBusinessSid()); FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); flowProcessMapQuery.setProDefKey(finBillApplication.getProcDefId()); @@ -3100,14 +3150,14 @@ public class FinBillApplicationService extends MybatisBaseService createPdf(String sid, String userName) { + ResultBean rb = ResultBean.fireFail(); + List photoList = new ArrayList<>(); + List imgList = new ArrayList<>(); + FinBillApplication finBillApplication = fetchBySid(sid); + Map dataMap = new HashMap(); + //获取审批记录 + List flowRecordVo = flowableFeignPro.flowRecordAndComment(finBillApplication.getProcInstSid(), "1").getData(); + List finBillApplicationSourceLCVos = new ArrayList<>(); + for (PCHistTaskListAndCommentList flowTask : flowRecordVo) { + if (flowTask.getFlowableRecordVo() != null) { + Map flowableRecordVo = flowTask.getFlowableRecordVo(); + FinBillApplicationSourceLCVo finBillApplicationSourceLCVo = new FinBillApplicationSourceLCVo(); + List> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos"); + Map comment = ConstantUtils.getMap(flowableRecordVo, "comment"); + String assigneeName = (String) taskUserInfos.get(0).get("assigneeName"); + String comment1 = (String) comment.get("comment"); + finBillApplicationSourceLCVo.setName(assigneeName); + finBillApplicationSourceLCVo.setComment(comment1); + finBillApplicationSourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString()); + finBillApplicationSourceLCVos.add(finBillApplicationSourceLCVo); + } else { + Map processCommentVo = flowTask.getProcessCommentVo(); + FinBillApplicationSourceLCVo finBillApplicationSourceLCVo = new FinBillApplicationSourceLCVo(); + finBillApplicationSourceLCVo.setName(processCommentVo.get("title").toString()); + finBillApplicationSourceLCVo.setComment(processCommentVo.get("content").toString()); + finBillApplicationSourceLCVo.setSpsj(processCommentVo.get("time").toString()); + finBillApplicationSourceLCVos.add(finBillApplicationSourceLCVo); + List fileList = (List) processCommentVo.get("fileList"); + if (fileList.size() > 0) { + for (String s : fileList) { + imgList.add(s); + } + } + } + } + List messages = messageFeign.selectByBusinessSid(finBillApplication.getSid()).getData(); + if (messages.size() > 0) { + for (Message message : messages) { + FinBillApplicationSourceLCVo finBillApplicationSourceLCVo = new FinBillApplicationSourceLCVo(); + String receiverNames = ""; + List messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData(); + if (messageLists.size() > 0) { + for (MessageList messageList : messageLists) { + receiverNames = receiverNames + messageList.getReceiverName() + ","; + } + } + finBillApplicationSourceLCVo.setName("系统"); + finBillApplicationSourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(","))); + finBillApplicationSourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss")); + finBillApplicationSourceLCVos.add(finBillApplicationSourceLCVo); + } + } + finBillApplicationSourceLCVos.sort(comparing(FinBillApplicationSourceLCVo::getSpsj)); + dataMap.put("lcList", finBillApplicationSourceLCVos); + //发起人 + dataMap.put("fqr", finBillApplication.getCreateByName()); + //发起部门 + dataMap.put("fqbm", finBillApplication.getDeptName()); + //发起日期 + dataMap.put("fqrq", finBillApplication.getApplyDate()); + //销售专员 + dataMap.put("xszy", finBillApplication.getStaffName()); + //销售部门 + dataMap.put("xsbm", finBillApplication.getSaleDeptName()); + //销售类型 + dataMap.put("xslx", finBillApplication.getSaleTypeValue()); + //合同编号 + dataMap.put("htbh", finBillApplication.getContractNo()); + //开票单位 + dataMap.put("kpdw", finBillApplication.getOpenTickUnitName()); + //客户名称 + dataMap.put("khmc", finBillApplication.getCustomerName()); + //单台开票金额 + dataMap.put("zcdtkpje", finBillApplication.getOneBillMoney().toString()); + //是否领取发票 + dataMap.put("sflqfp", finBillApplication.getIsLQOrigInvoice()); + //开票名称默认 + dataMap.put("kpmcmr", finBillApplication.getOpenTickName()); + //主车信息 + List finBillVehicleVos = finBillVehicleService.fetchByMainSid(sid); + List finBillApplicationZcListVos = new ArrayList<>(); + int zcId = 1; + for (FinBillVehicleVo finBillVehicleVo : finBillVehicleVos) { + FinBillApplicationZcListVo finBillApplicationZcListVo = new FinBillApplicationZcListVo(); + finBillApplicationZcListVo.setIdzc(zcId); + finBillApplicationZcListVo.setZccjh(finBillVehicleVo.getVinNo()); + finBillApplicationZcListVo.setZchgz(finBillVehicleVo.getCertificateStateValue()); + finBillApplicationZcListVo.setZckplx(finBillVehicleVo.getBillTypeValue()); + finBillApplicationZcListVo.setZckpmc(finBillVehicleVo.getOpenTickName()); + finBillApplicationZcListVo.setZckpxx(finBillVehicleVo.getOpenTickRemarks()); + finBillApplicationZcListVos.add(finBillApplicationZcListVo); + zcId = zcId + 1; + } + dataMap.put("zcxx", finBillApplicationZcListVos); + //欠款金额合计 + dataMap.put("qkjehj", finBillApplication.getArrearsMoney()); + //承诺回款日期 + dataMap.put("cnhkrq", finBillApplication.getReturnedMoneyDate()); + //欠款开票原因 + dataMap.put("qkkpyy", finBillApplication.getArrearsOpenYYValue()); + //欠款原因备注 + dataMap.put("remarks", finBillApplication.getRemarks()); + //挂车信息 + List finBillTrailerVos = finBillTrailerService.fetchByMainSid(sid); + List finBillApplicationGcListVos = new ArrayList<>(); + int gcId = 1; + if (!finBillTrailerVos.isEmpty()){ + for (FinBillTrailerVo finBillTrailerVo : finBillTrailerVos) { + FinBillApplicationGcListVo finBillApplicationGcListVo = new FinBillApplicationGcListVo(); + finBillApplicationGcListVo.setIdgc(gcId); + finBillApplicationGcListVo.setGccjh(finBillTrailerVo.getGcVinNo()); + finBillApplicationGcListVo.setZccjh(finBillTrailerVo.getVinNo()); + finBillApplicationGcListVo.setGckpje(finBillTrailerVo.getOneBillMoney()); + finBillApplicationGcListVos.add(finBillApplicationGcListVo); + gcId = gcId + 1; + } + } + dataMap.put("gcxx", finBillApplicationGcListVos); + //是否显示挂车信息 + if (finBillApplicationGcListVos.size() > 0) { + dataMap.put("isXS", "是"); + } else { + dataMap.put("isXS", "否"); + } + //下载人 + dataMap.put("downName", userName); + //下载时间 + dataMap.put("downTime", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")); + //获取图片路径 + List finBillFileVos = finBillFileService.fetchFileByBillSid(sid); + for (FinBillFileVo finBillFileVo : finBillFileVos) { + String fileUrl = finBillFileVo.getFileUrl(); + String urlPrefix = fileUploadComponent.getUrlPrefix(); + try { + fileUrl = urlPrefix + URLEncoder.encode(fileUrl, "utf-8"); + String image2Base64 = image2Base64(fileUrl); + photoList.add(image2Base64); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } + if (imgList.size() > 0) { + for (String image : imgList) { + 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(); + } + } + } + } + dataMap.put("photoPath64", photoList); + //获取模板 + //模板路径 + String sourcePath = "D:\\anrui\\upload\\template\\"; + //生成word文件名 + String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); + long seconds = System.currentTimeMillis(); + String typeName = dateStr + seconds + ".doc"; + //生成文件路径 + String targetPath = sourcePath + dateStr; + WordUtils.creatWord(dataMap, "qkkpsqd", sourcePath, targetPath, typeName); + //新生成的word路径 + String wordPath = targetPath + "\\" + typeName; + //生成欠款开票文件名 + String pdfName = "欠款开票审批单" + finBillApplication.getContractNo() + ".pdf"; + WordUtils.doc2pdf(wordPath, targetPath, pdfName, userName); + return rb.success().setData("template/" + dateStr + "/" + pdfName); + } + + public static String image2Base64(String imgUrl) { + URL url = null; + InputStream is = null; + ByteArrayOutputStream outStream = null; + HttpURLConnection httpUrl = null; + try { + url = new URL(imgUrl); + httpUrl = (HttpURLConnection) url.openConnection(); + httpUrl.connect(); + httpUrl.getInputStream(); + is = httpUrl.getInputStream(); + outStream = new ByteArrayOutputStream(); + //创建一个Buffer字符串 + byte[] buffer = new byte[1024]; + //每次读取的字符串长度,如果为-1,代表全部读取完毕 + int len = 0; + //使用一个输入流从buffer里把数据读取出来 + while ((len = is.read(buffer)) != -1) { + //用输出流往buffer里写入数据,中间参数代表从哪个位置开始读,len代表读取的长度 + outStream.write(buffer, 0, len); + } + // 对字节数组Base64编码 + return Base64.encode(outStream.toByteArray()); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (is != null) { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (outStream != null) { + try { + outStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (httpUrl != null) { + httpUrl.disconnect(); + } + } + return imgUrl; + } } \ No newline at end of file diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileMapper.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileMapper.java index a8672c199c..e241227366 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileMapper.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileMapper.java @@ -89,5 +89,8 @@ public interface FinBillFileMapper extends BaseMapper { @Select("select * from fin_bill_file where billAppSid = #{sid} and attachType = '005'") List fetchfjBySid(String sid); + @Select("select * from fin_bill_file where billAppSid = #{sid} and attachType = '006'") + List fetchqklpfjBySid(String sid); + List fetchFileByBillSid(@Param("sid") String sid); } \ No newline at end of file diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileService.java index bd4143f675..9ba5589ee6 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileService.java @@ -169,4 +169,8 @@ public class FinBillFileService extends MybatisBaseService fetchFileByBillSid(String sid) { return baseMapper.fetchFileByBillSid(sid); } + + public List fetchqklpfjBySid(String sid) { + return baseMapper.fetchqklpfjBySid(sid); + } } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoDto.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoDto.java index 3777727beb..2789ac42df 100644 --- a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoDto.java +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoDto.java @@ -43,7 +43,7 @@ public class SysStaffinfoDto implements Dto { @ApiModelProperty(value = "员工编号") private String jobNumber; @ApiModelProperty(value = "身份证号", required = true) - @Pattern(regexp = "/(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)/", message = "请输入正确的身份证号") + @Pattern(regexp = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$", message = "请输入正确的身份证号") @NotBlank(message = "身份证号不能为空") private String idNo; @ApiModelProperty(value = "证件有效期", required = true) diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoiceDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoiceDto.java index ed083af96b..ffbc7b5840 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoiceDto.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoiceDto.java @@ -63,6 +63,8 @@ public class AdvanceInvoiceDto implements Dto { private List registerContractImages; @ApiModelProperty("确认书") private List invoiceApplyConfirmImages; + @ApiModelProperty("欠款领票附件") + private List arrearsCollectionAppendxs; @ApiModelProperty("用户sid") private String userSid; @ApiModelProperty("组织全路径") diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoiceInfoVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoiceInfoVo.java index 00632404b1..9058784e4b 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoiceInfoVo.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoiceInfoVo.java @@ -68,6 +68,8 @@ public class AdvanceInvoiceInfoVo implements Vo { private List registerContractImages; @ApiModelProperty("确认书") private List invoiceApplyConfirmImages; + @ApiModelProperty("欠款领票附件") + private List arrearsCollectionAppendxs; @ApiModelProperty("用户sid") private String userSid; @ApiModelProperty("组织全路径") diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/flowable/qkkpDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/flowable/qkkpDto.java index f6305d3588..9587b129f7 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/flowable/qkkpDto.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/flowable/qkkpDto.java @@ -47,6 +47,8 @@ public class qkkpDto implements Dto { private List registerContractImages = new ArrayList<>(); @ApiModelProperty("确认书") private List invoiceApplyConfirmImages = new ArrayList<>(); + @ApiModelProperty("欠款领票附件") + private List arrearsCollectionAppendxs = new ArrayList<>(); private String orgPath; diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/advanceInvoice/AppBusAdvanceGinvoiceapplyService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/advanceInvoice/AppBusAdvanceGinvoiceapplyService.java index dbb9a039b4..19ab87a43c 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/advanceInvoice/AppBusAdvanceGinvoiceapplyService.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/advanceInvoice/AppBusAdvanceGinvoiceapplyService.java @@ -480,10 +480,12 @@ public class AppBusAdvanceGinvoiceapplyService { List invoiceApplyConfirmImages = dto.getInvoiceApplyConfirmImages();//开票信息确认书 List registerContractImages = dto.getRegisterContractImages();//车辆登记合同 List idCardImages = dto.getIdCardImages();//证件 + List arrearsCollectionAppendxs = dto.getArrearsCollectionAppendxs();//欠款领票附件 List khkpsqsApplicationAppendxs = new ArrayList<>(); // 客户开票申请书附件信息 List kpxxqrsApplicationAppendxs = new ArrayList<>(); // 开票信息确认书附件信息 List cldjhtApplicationAppendxs = new ArrayList<>(); // 车辆登记合同附件信息 List idCardImagesPC = new ArrayList<>();//证件 + List qklpfjImages = new ArrayList<>(); // 欠款领票附件 if (customerInvoiceApplyImages != null) { for (String customerInvoiceApplyImage : customerInvoiceApplyImages) { FinBillFileDto finBillFileDto = new FinBillFileDto(); @@ -512,10 +514,18 @@ public class AppBusAdvanceGinvoiceapplyService { idCardImagesPC.add(finBillFileDto); } } + if (arrearsCollectionAppendxs != null) { + for (String arrearsCollectionAppendx : arrearsCollectionAppendxs) { + FinBillFileDto finBillFileDto = new FinBillFileDto(); + finBillFileDto.setFileUrl(arrearsCollectionAppendx); + qklpfjImages.add(finBillFileDto); + } + } finBillApplicationDto.setKhkpsqsApplicationAppendxs(khkpsqsApplicationAppendxs); finBillApplicationDto.setKpxxqrsApplicationAppendxs(kpxxqrsApplicationAppendxs); finBillApplicationDto.setCldjhtApplicationAppendxs(cldjhtApplicationAppendxs); finBillApplicationDto.setZjApplicationAppendxs(idCardImagesPC); + finBillApplicationDto.setArrearsCollectionAppendxs(qklpfjImages); ResultBean resultBean = finBillApplicationFeign.saveQK(finBillApplicationDto); return resultBean; } @@ -889,10 +899,12 @@ public class AppBusAdvanceGinvoiceapplyService { List kpxxqrsApplicationAppendxs = finBillApplicationDetailsVo.getKpxxqrsApplicationAppendxs(); List cldjhtApplicationAppendxs = finBillApplicationDetailsVo.getCldjhtApplicationAppendxs(); List zjApplicationAppendxs = finBillApplicationDetailsVo.getZjApplicationAppendxs(); + List arrearsCollectionAppendxs = finBillApplicationDetailsVo.getArrearsCollectionAppendxs(); List customerInvoiceApplyImages = new ArrayList<>();//客户开票申请书 List invoiceApplyConfirmImages = new ArrayList<>();//开票信息确认书 List registerContractImages = new ArrayList<>();//车辆登记合同 List idCardImages = new ArrayList<>(); + List qklpfjImages = new ArrayList<>();//欠款领票附件 if (zjApplicationAppendxs != null) { for (FinBillFileVo zjApplicationAppendx : zjApplicationAppendxs) { idCardImages.add(zjApplicationAppendx.getFileUrl()); @@ -913,10 +925,16 @@ public class AppBusAdvanceGinvoiceapplyService { registerContractImages.add(cldjhtApplicationAppendx.getFileUrl()); } } + if (arrearsCollectionAppendxs != null) { + for (FinBillFileVo cldjhtApplicationAppendx : arrearsCollectionAppendxs) { + qklpfjImages.add(cldjhtApplicationAppendx.getFileUrl()); + } + } vo.setCustomerInvoiceApplyImages(customerInvoiceApplyImages); vo.setInvoiceApplyConfirmImages(invoiceApplyConfirmImages); vo.setRegisterContractImages(registerContractImages); vo.setIdCardImages(idCardImages); + vo.setArrearsCollectionAppendxs(qklpfjImages); BusSalesOrderIsDTKPJVo busSalesOrderIsDTKPJVo = busSalesOrderFeign.fetchByContractNo(finBillApplicationDetailsVo.getContractNo()).getData(); if (StringUtils.isNotBlank(busSalesOrderIsDTKPJVo.getOneBillMoney())) { vo.setIsCanEdit(false); @@ -953,10 +971,12 @@ public class AppBusAdvanceGinvoiceapplyService { List invoiceApplyConfirmImages = dto.getInvoiceApplyConfirmImages();//开票信息确认书 List registerContractImages = dto.getRegisterContractImages();//车辆登记合同 List idCardImages = dto.getIdCardImages();//证件 + List arrearsCollectionAppendxs = dto.getArrearsCollectionAppendxs();//欠款领票附件 List khkpsqsApplicationAppendxs = new ArrayList<>(); // 客户开票申请书附件信息 List kpxxqrsApplicationAppendxs = new ArrayList<>(); // 开票信息确认书附件信息 List cldjhtApplicationAppendxs = new ArrayList<>(); // 车辆登记合同附件信息 List idCardImagesPC = new ArrayList<>();//证件 + List qklpfjImages = new ArrayList<>();//欠款领票附件 if (customerInvoiceApplyImages != null) { for (String customerInvoiceApplyImage : customerInvoiceApplyImages) { FinBillFileDto finBillFileDto = new FinBillFileDto(); @@ -985,10 +1005,18 @@ public class AppBusAdvanceGinvoiceapplyService { idCardImagesPC.add(finBillFileDto); } } + if (arrearsCollectionAppendxs != null) { + for (String arrearsCollectionAppendx : arrearsCollectionAppendxs) { + FinBillFileDto finBillFileDto = new FinBillFileDto(); + finBillFileDto.setFileUrl(arrearsCollectionAppendx); + qklpfjImages.add(finBillFileDto); + } + } finBillCompleteDto.setKhkpsqsApplicationAppendxs(khkpsqsApplicationAppendxs); finBillCompleteDto.setKpxxqrsApplicationAppendxs(kpxxqrsApplicationAppendxs); finBillCompleteDto.setCldjhtApplicationAppendxs(cldjhtApplicationAppendxs); finBillCompleteDto.setZjApplicationAppendxs(idCardImagesPC); + finBillCompleteDto.setArrearsCollectionAppendxs(qklpfjImages); finBillCompleteDto.setOrgSidPath(orgSidPath); ResultBean resultBean = finBillApplicationFeign.completeBy(finBillCompleteDto); if (!resultBean.getSuccess()) { diff --git a/工作内容需要的文档/单据模板/欠款开票申请单单据打印模板/qkkpsqd.ftl b/工作内容需要的文档/单据模板/欠款开票申请单单据打印模板/qkkpsqd.ftl new file mode 100644 index 0000000000..521655c23b --- /dev/null +++ b/工作内容需要的文档/单据模板/欠款开票申请单单据打印模板/qkkpsqd.ftl @@ -0,0 +1,2435 @@ + + + + + God + 孟哲 底 + 2 + 0 + 2023-06-01T06:48:00Z + 2023-06-01T06:48:00Z + 1 + 82 + 468 + 3 + 1 + 549 + 16 + + + 2052-11.1.0.14309 + 8A67112E9346437E8416DED6886866AF_12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 欠款开票申请单 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发起人 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${fqr!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 发起部门 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${fqbm!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 发起日期 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${fqrq!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 销售专员 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${xszy!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 销售部门 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${xsbm!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 销售类型 + + + + + + + + + + + + + + + + + + + + + + + + + + ${xslx!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 合同编号 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${htbh!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 开票单位 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${kpdw!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 客户名称 + + + + + + + + + + + + + + + + + + + + + + + + + + ${khmc!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 主车开票信息 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 单台开票金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${zcdtkpje!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 是否领取发票 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${sflqfp!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 开票名称默认 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${kpmcmr!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + 序号 + + + + + + + + + + + + + + + + + + + + + + + + + + + 车架号 + + + + + + + + + + + + + + + + + + + + + + + + + + + 合格证状态 + + + + + + + + + + + + + + + + + + + + + + + + + + + 开票类型 + + + + + + + + + + + + + + + + + + + + + + + + + + + 开票名称 + + + + + + + + + + + + + + + + + + + + + + + + + + + 开票信息 + + + + + <#list zcxx as z> + + + + + + + + + + + + + + + + + + + + + + + + + ${z.idzc!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${z.zccjh!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${z.zchgz!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${z.zckplx!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${z.zckpmc!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${z.zckpxx!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 欠款金额合计 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${qkjehj!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 承诺回款日期 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${cnhkrq!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 欠款开票原因 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${qkkpyy!} + + + + + + + + + + + + + + + + + + + + + + + + + + + ${remarks!} + + + + + <#if (isXS == "是")> + + + + + + + + + + + + + + + + + + + + + + + + + 挂车开票信息(挂车的开票类型、开票名称与主车相同) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 序号 + + + + + + + + + + + + + + + + + + + + + + + + + + + 挂车车架号 + + + + + + + + + + + + + + + + + + + + + + + + + + + 主车车架号 + + + + + + + + + + + + + + + + + + + + + + + + + + + 开票金额 + + + + + <#list gcxx as g> + + + + + + + + + + + + + + + + + + + + + + + + + + ${g.idgc!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${g.gccjh!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${g.zccjh!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${g.gckpje!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 审批流程 + + + + <#list lcList as lc> + <#if (lc_index==0)> + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.comment!} + + + + + + + + + + + + + + + + + + + ${lc.name!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.spsj!} + + + + + + + <#list lcList as lc> + <#if (lc_index>0)> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.comment!} + + + + + + + + + + + + + + + + + + + ${lc.name!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${lc.spsj!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 下载人: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${downName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 下载时间: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${downTime!} + + + + + + <#list photoPath64 as photo> + + + + + + + + + + + + + + + + + + + + + + + + + + + ${photo} + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/工作内容需要的文档/单据模板/欠款开票申请单单据打印模板/欠款开票申请单.doc b/工作内容需要的文档/单据模板/欠款开票申请单单据打印模板/欠款开票申请单.doc new file mode 100644 index 0000000000..9d455f2d1e --- /dev/null +++ b/工作内容需要的文档/单据模板/欠款开票申请单单据打印模板/欠款开票申请单.doc @@ -0,0 +1,28 @@ + +|欠款开票申请单 | +|发起人|${fqr!} |发起部|${fqbm!} |发起 |${fqrq!} | +| | |门 | |日期 | | +|销售专|${xszy!} |销售部|${xsbm!} |销售 |${xslx!} | +|员 | |门 | |类型 | | +|合同编|${htbh!} |开票单|${kpdw!} |客户 |${khmc!} | +|号 | |位 | |名称 | | +|主车开票信息 | +|单台开票|${zcdtkpje|是否领取 |${sflqfp|开票名称 |${kpmcmr!} | +|金额 |!} |发票 |!} |默认 | | +|序号 |车架号 |合格证 |开票类型 |开票名称 |开票信息 | +| | |状态 | | | | +|${z.i|${z.zccj|${z.zch|${z.kplx!} |${z.kpmc!} |${z.zckpxx!} | +|dzc!}|h!} |gz!} | | | | +|欠款金额合|${qkjehj!} |承诺回款日期|${cnhkrq!} | +|计 | | | | +|欠款开票原|${qkkpyy|${remarks!} | +|因 |!} | | +|挂车开票信息(挂车的开票类型、开票名称与主车相同) | +|序号 |挂车车架号 |主车车架号 |开票金额 | +|${g.idgc!} |${g.gccjh!} |${g.zccjh!} |${g.gckpje!} | +|审批流程 |${lc.comment!} |${lc.spsj! | +| |${lc.name!} | | +|下载人: |${downName!}|下载时间: |${downTime!} | + + +[pic]