diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java index ea7a7d1d97..33755c157d 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java @@ -28,6 +28,7 @@ import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; import com.yxt.anrui.buscenter.api.bussalesorder.app.order.*; import com.yxt.anrui.crm.api.crmcustomer.CrmCustomerFeign; import com.yxt.anrui.crm.api.crmcustomerfile.CrmCustomerFileFeign; +import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerFileDDto; import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.FinUncollectedReceivablesDetailedFeign; @@ -1101,29 +1102,29 @@ public class CommonContractService extends MybatisBaseService> resultBean = crmCustomerTempFeign.selectCustomerFile(vo.getCustomerSid()); - List stringList = resultBean.getData(); - if (stringList.size() > 0) { - vo.setIdCardArchives(true); - vo.setIdCardImages(stringList); - } else { - vo.setIdCardArchives(false); - if (StringUtils.isNotBlank(vo.getIdImagesUrl())) { - String[] split3 = vo.getIdImagesUrl().split(","); - List idCard = new ArrayList<>(); - List idCardImages = Arrays.asList(split3); - for (String idCardImage : idCardImages) { - String idCardImagesUrl = urlPrefix + idCardImage; - idCard.add(idCardImagesUrl); - } - vo.setIdCardImages(idCard); - } else { - vo.setIdCardImages(new ArrayList<>()); +// if ("1".equals(vo.getCustomerKey())) { + //查询客户的档案库中是否有图片 + ResultBean> resultBean = crmCustomerTempFeign.selectCustomerFile(vo.getCustomerSid()); + List stringList = resultBean.getData(); + if (stringList.size() > 0) { + vo.setIdCardArchives(true); + vo.setIdCardImages(stringList); + } else { + vo.setIdCardArchives(false); + if (StringUtils.isNotBlank(vo.getIdImagesUrl())) { + String[] split3 = vo.getIdImagesUrl().split(","); + List idCard = new ArrayList<>(); + List idCardImages = Arrays.asList(split3); + for (String idCardImage : idCardImages) { + String idCardImagesUrl = urlPrefix + idCardImage; + idCard.add(idCardImagesUrl); } + vo.setIdCardImages(idCard); + } else { + vo.setIdCardImages(new ArrayList<>()); } } +// } } return vo; } @@ -1341,7 +1342,7 @@ public class CommonContractService extends MybatisBaseService> listResultBean = crmCustomerTempFeign.selectCustomerFile(commonContract.getCustomerSid()); + List stringList = listResultBean.getData(); + if (stringList.size() == 0) { + //初始化客户档案并保存 + CrmCustomerFileDDto crmCustomerFileDDto = new CrmCustomerFileDDto(); + crmCustomerFileDDto.setUserSid(bv.getUserSid()); + crmCustomerFileDDto.setCustomerSid(commonContract.getCustomerSid()); + crmCustomerFileDDto.setIdImages(Arrays.asList(commonContract.getIdImagesUrl().split(","))); + ResultBean resultBean1 = crmCustomerTempFeign.saveFileCustomer(crmCustomerFileDDto); + } } return rb.success().setData(resultBean.getData()); } else { diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/buscenterfile/BuscenterFileEnum.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/buscenterfile/BuscenterFileEnum.java index e42e9724d4..940bf9ccf0 100644 --- a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/buscenterfile/BuscenterFileEnum.java +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/buscenterfile/BuscenterFileEnum.java @@ -12,6 +12,10 @@ public enum BuscenterFileEnum { IDCARD_IMAGES("003", "委托人身份证(正反面)"), ENTRUST_CONFIRM_IMAGES("004", "交车资料确认单"), EXIT_TICKET_IMAGES("005", "出门证照片"), + RECEIVE_CAR("006", "接收车辆确认书"), + ENTRUST("007", "委托提车授权书"), + ENTRUST_CONFIRM("008", "交车资料确认单"), + EXIT_TICKET("009", "出门证"), ; diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/BusHandoverVo.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/BusHandoverVo.java index 990bcb1ebe..7e71d4cb15 100644 --- a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/BusHandoverVo.java +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/BusHandoverVo.java @@ -6,6 +6,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.ArrayList; +import java.util.List; + /** * Project: anrui-buscenter(业务中心)
* File: BusHandoverVo.java
@@ -41,5 +44,6 @@ public class BusHandoverVo implements Vo { @ApiModelProperty("记录sid") private String sid; //下载路径 + private List fileResps = new ArrayList<>(); } diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/DownloadVo.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/DownloadVo.java new file mode 100644 index 0000000000..795f547384 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/DownloadVo.java @@ -0,0 +1,18 @@ +package com.yxt.anrui.buscenter.api.bushandover; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/11/15 22:02 + * @Description + */ +@Data +public class DownloadVo implements Vo { + private static final long serialVersionUID = -436246426474940366L; + + private String name; + + private String downloadUrl; +} diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandoveritems/BusItemVo.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandoveritems/BusItemVo.java new file mode 100644 index 0000000000..f0e4253ca6 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandoveritems/BusItemVo.java @@ -0,0 +1,18 @@ +package com.yxt.anrui.buscenter.api.bushandoveritems; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/11/15 16:32 + * @Description + */ +@Data +public class BusItemVo implements Vo { + private static final long serialVersionUID = -2750251940103150209L; + + private String vinNo; + + private String itemValue; +} diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandoveritems/BusItemsListVo.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandoveritems/BusItemsListVo.java new file mode 100644 index 0000000000..e670361682 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandoveritems/BusItemsListVo.java @@ -0,0 +1,19 @@ +package com.yxt.anrui.buscenter.api.bushandoveritems; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/11/15 19:10 + * @Description + */ +@Data +public class BusItemsListVo implements Vo { + private static final long serialVersionUID = -3594117540119076368L; + + private String vinNo; + @ApiModelProperty("发动机号") + private String engineNo; +} diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileMapper.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileMapper.java index 1321661fa4..93a4319b4b 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileMapper.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileMapper.java @@ -17,4 +17,6 @@ public interface BuscenterFileMapper extends BaseMapper { List selectByLinkSid(@Param("sid") String sid, @Param("attachType")String attachType); int deleteByLinkSid(String sid); + + BuscenterFile selectByLinkSidOne(@Param("sid") String sid, @Param("attachType") String attachType); } diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileMapper.xml b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileMapper.xml index e45b53823c..c4d543993c 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileMapper.xml +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileMapper.xml @@ -4,7 +4,8 @@ @@ -12,4 +13,11 @@ from buscenter_file where linkSid = #{sid} + + \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileService.java index aebc01d999..33f0cdda18 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/buscenterfile/BuscenterFileService.java @@ -44,4 +44,8 @@ public class BuscenterFileService extends MybatisBaseService * File: BusHandoverService.java
@@ -64,9 +80,22 @@ public class BusHandoverService extends MybatisBaseService> saveDeliverybill(BusHandoverDto dto) { ResultBean> rb = ResultBean.fireFail(); + //ToDo:验证是否包含已存在的车辆 BusHandover busHandover = new BusHandover(); BeanUtil.copyProperties(dto, busHandover, "sid"); String userSid = dto.getUserSid(); @@ -84,6 +113,7 @@ public class BusHandoverService extends MybatisBaseService userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); @@ -122,19 +152,277 @@ public class BusHandoverService extends MybatisBaseService list = new ArrayList<>(); - BusHandoverListVo vo = new BusHandoverListVo(); - vo.setName("<<接收车辆确认书>>"); - list.add(vo); - vo = new BusHandoverListVo(); - vo.setName("<<出门证>>"); - list.add(vo); - vo = new BusHandoverListVo(); - vo.setName("<<交车资料确认单>>"); - list.add(vo); + List buscenterFileList = new ArrayList<>(); + try { + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() + .setNameFormat("demo-pool-%d").build(); + ExecutorService pool = new ThreadPoolExecutor(2, 100, + 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); + //接收车辆确认书 + BusHandoverListVo busHandoverListVo = null; + BuscenterFile buscenterFile = null; + Future future1 = pool.submit(() -> { + return receiveCar(busHandover.getSid()); + }); + if (StringUtils.isNotBlank(future1.get())) { + busHandoverListVo = new BusHandoverListVo(); + busHandoverListVo.setName(MessageFormat.format("《{0}》", BuscenterFileEnum.RECEIVE_CAR.getMark())); + busHandoverListVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + future1.get()); + list.add(busHandoverListVo); + String str = future1.get(); + buscenterFile = new BuscenterFile(); + buscenterFile.setLinkSid(busHandover.getSid()); + buscenterFile.setFilePath(future1.get()); + buscenterFile.setAttachType(BuscenterFileEnum.RECEIVE_CAR.getAttachType()); + File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); + if (file != null) { + buscenterFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); + } + buscenterFile.setFileName(BuscenterFileEnum.RECEIVE_CAR.getMark()); + buscenterFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); + buscenterFileService.insert(buscenterFile); + } + /* Future future2 = pool.submit(() -> { + return entrustConfirmImages(busHandover.getSid()); + }); + if (StringUtils.isNotBlank(future2.get())) { + busHandoverListVo = new BusHandoverListVo(); + busHandoverListVo.setName(MessageFormat.format("《{0}》", BuscenterFileEnum.ENTRUST_CONFIRM_IMAGES.getMark())); + busHandoverListVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + future2.get()); + list.add(busHandoverListVo); + String str = future1.get(); + buscenterFile = new BuscenterFile(); + buscenterFile.setLinkSid(busHandover.getSid()); + buscenterFile.setFilePath(future2.get()); + buscenterFile.setAttachType(BuscenterFileEnum.ENTRUST_CONFIRM.getAttachType()); + File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); + if (file != null) { + buscenterFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); + } + buscenterFile.setFileName(BuscenterFileEnum.ENTRUST_CONFIRM_IMAGES.getMark()); + buscenterFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); + buscenterFileService.insert(buscenterFile); + } + Future future3 = pool.submit(() -> { + return entrustImages(busHandover.getSid()); + }); + if (StringUtils.isNotBlank(future3.get())) { + busHandoverListVo = new BusHandoverListVo(); + busHandoverListVo.setName(MessageFormat.format("《{0}》", BuscenterFileEnum.ENTRUST_IMAGES.getMark())); + busHandoverListVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + future3.get()); + list.add(busHandoverListVo); + String str = future1.get(); + buscenterFile = new BuscenterFile(); + buscenterFile.setLinkSid(busHandover.getSid()); + buscenterFile.setFilePath(future3.get()); + buscenterFile.setAttachType(BuscenterFileEnum.ENTRUST.getAttachType()); + File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); + if (file != null) { + buscenterFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); + } + buscenterFile.setFileName(BuscenterFileEnum.ENTRUST_IMAGES.getMark()); + buscenterFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); + buscenterFileService.insert(buscenterFile); + } + Future future4 = pool.submit(() -> { + return outDoor(busHandover.getSid()); + }); + if (StringUtils.isNotBlank(future4.get())) { + busHandoverListVo = new BusHandoverListVo(); + busHandoverListVo.setName(MessageFormat.format("《{0}》", BuscenterFileEnum.EXIT_TICKET_IMAGES.getMark())); + busHandoverListVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + future4.get()); + list.add(busHandoverListVo); + String str = future1.get(); + buscenterFile = new BuscenterFile(); + buscenterFile.setLinkSid(busHandover.getSid()); + buscenterFile.setFilePath(future4.get()); + buscenterFile.setAttachType(BuscenterFileEnum.EXIT_TICKET.getAttachType()); + File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); + if (file != null) { + buscenterFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); + } + buscenterFile.setFileName(BuscenterFileEnum.EXIT_TICKET_IMAGES.getMark()); + buscenterFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); + buscenterFileService.insert(buscenterFile); + }*/ + } catch (Exception e) { + e.printStackTrace(); + return rb.setMsg("生成文件失败"); + } return rb.success().setData(list); } + /** + * 接收车辆确认书 + * + * @param sid 交车确认sid + * @return + */ + private String receiveCar(String sid) { + Map map = new HashMap<>(); + //组装数据 + BusHandover busHandover = fetchBySid(sid); + ResultBean resultBean = commonContractFeign.selectByNo(busHandover.getContractNo()); + CommonContract commonContract = resultBean.getData(); + map.put("useOrgName", commonContract.getPartyA()); + map.put("contractNo", busHandover.getContractNo()); + ResultBean voResultBean = sysStaffinfoFeign.fetchBySid(busHandover.getStaffSid()); + SysStaffinfoDetailsVo staffinfoDetailsVo = voResultBean.getData(); + if (staffinfoDetailsVo != null) { + map.put("staffName", staffinfoDetailsVo.getName()); + } + map.put("customerName", busHandover.getCustomerName()); + ResultBean customerTempResultBean = crmCustomerTempFeign.getAppCustomerTempDetailsBySid(commonContract.getCustomerSid()); + AppCrmCustomerTempInfoVo appCrmCustomerTempInfoVo = customerTempResultBean.getData(); + map.put("idNo", appCrmCustomerTempInfoVo.getIdNumber()); + map.put("name", busHandover.getRecipient()); + map.put("idNumber", busHandover.getIdNo()); + map.put("date", busHandover.getDeliverDate()); + map.put("address", busHandover.getDeliverAddress()); + ResultBean orderDetailsVoResultBean = busSalesOrderService.getSaleOrderDetails(busHandover.getOrderSid()); + AppOrderDetailsVo appOrderDetailsVo = orderDetailsVoResultBean.getData(); + AppOrderModelInfoVo appOrderModelInfoVo = appOrderDetailsVo.getModelInfo(); + map.put("brandName", appOrderModelInfoVo.getBrand()); + map.put("model", appOrderModelInfoVo.getModelName()); + ResultBean baseVehicleConfigVoResultBean = baseModelConfigFeign.details(appOrderModelInfoVo.getConfigSid()); + BaseModelConfigSelectVo baseModelConfigSelectVo = baseVehicleConfigVoResultBean.getData(); + map.put("color", baseModelConfigSelectVo.getCarColor()); + List busItemsListVoList = busHandoverItemsService.getListOne(sid); + map.put("busItemsListVoList", busItemsListVoList); +// File file = new File(getClass().getClassLoader().getResource("ftl/receiveCar.ftl").getFile()); + InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/receiveCar.ftl"); +// String dir = getClassLoader().getResource("ftl").getPath(); + String dir = this.getClass().getResource("ftl").getPath(); + //生成word文件名 + String targetPath = docPdfComponent.getUploadTemplateUrl(); + String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); + long seconds = System.currentTimeMillis(); + String typeName = dateStr + seconds + ".doc"; + File file = new File(targetPath +"receiveCar.ftl"); + WordConvertUtils.inputStreamToFile(inputStream, file); + WordConvertUtils.creatWord(map, file, targetPath, typeName, dir); + //新生成的word路径 + String wordPath = targetPath + typeName; + //生成出门证文件名 + String pdfName = dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + return pdfName; + } + + /** + * 委托提车授权书 + * + * @param sid + * @return + */ + public String entrustImages(String sid) { + Map map = new HashMap<>(); + //组装数据 + //根据合同编号查询委托提车授权书 + BusHandover busHandover = fetchBySid(sid); + ResultBean resultBean = commonContractFeign.selectByNo(busHandover.getContractNo()); + CommonContract commonContract = resultBean.getData(); + map.put("orgName", commonContract.getPartyA()); + map.put("customerName", commonContract.getPartyB()); + ResultBean customerTempResultBean = crmCustomerTempFeign.getAppCustomerTempDetailsBySid(commonContract.getCustomerSid()); + AppCrmCustomerTempInfoVo appCrmCustomerTempInfoVo = customerTempResultBean.getData(); + map.put("idNo", appCrmCustomerTempInfoVo.getIdNumber()); + map.put("name", busHandover.getRecipient()); + map.put("idNumber", busHandover.getIdNo()); + map.put("contractNo", busHandover.getContractNo()); + List list = busHandoverItemsService.getList(sid); + List stringList = list.stream().map(v -> v.getVinNo()).collect(Collectors.toList()); + map.put("vinNo", String.join(",", stringList)); + File file = new File(getClass().getClassLoader().getResource("ftl/entrust.ftl").getFile()); + String dir = getClassLoader().getResource("ftl").getPath(); + //生成word文件名 + String targetPath = docPdfComponent.getUploadTemplateUrl(); + String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); + long seconds = System.currentTimeMillis(); + String typeName = dateStr + seconds + ".doc"; + WordConvertUtils.creatWord(map, file, targetPath, typeName, dir); + //新生成的word路径 + String wordPath = targetPath + typeName; + //生成出门证文件名 + String pdfName = dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + return pdfName; + } + + /** + * 交车资料确认单 + * + * @param sid + * @return + */ + public String entrustConfirmImages(String sid) { + Map map = new HashMap<>(); + //组装数据 + BusHandover busHandover = fetchBySid(sid); + map.put("contractNo", busHandover.getContractNo()); + map.put("customerName", busHandover.getCustomerName()); + List list = busHandoverItemsService.getList(sid); + map.put("list", list); + File file = new File(getClass().getClassLoader().getResource("ftl/entrustConfirm.ftl").getFile()); + String dir = getClassLoader().getResource("ftl").getPath(); + //生成word文件名 + String targetPath = docPdfComponent.getUploadTemplateUrl(); + String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); + long seconds = System.currentTimeMillis(); + String typeName = dateStr + seconds + ".doc"; + WordConvertUtils.creatWord(map, file, targetPath, typeName, dir); + //新生成的word路径 + String wordPath = targetPath + typeName; + //生成出门证文件名 + String pdfName = dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + return pdfName; + } + + public String outDoor(String sid) { + Map map = new HashMap<>(); + //组装数据 + BusHandover busHandover = fetchBySid(sid); + ResultBean voResultBean = sysStaffinfoFeign.fetchBySid(busHandover.getStaffSid()); + SysStaffinfoDetailsVo staffinfoDetailsVo = voResultBean.getData(); + if (staffinfoDetailsVo != null) { + map.put("apply", staffinfoDetailsVo.getName()); + } + ResultBean resultBean = commonContractFeign.selectByNo(busHandover.getContractNo()); + CommonContract commonContract = resultBean.getData(); + map.put("orgName", commonContract.getPartyA()); + map.put("name", busHandover.getCustomerName()); + List list = busHandoverItemsService.getList(sid); + map.put("number", list.size()); + map.put("vinNo", String.join(",", list.stream().map(v -> v.getVinNo()).collect(Collectors.toList()))); + map.put("reason", "全款交车"); + map.put("operator", staffinfoDetailsVo.getName()); + map.put("operator", staffinfoDetailsVo.getName()); + map.put("carCollector", "-"); + map.put("date", busHandover.getDeliverDate()); + ResultBean orderDetailsVoResultBean = busSalesOrderService.getSaleOrderDetails(busHandover.getOrderSid()); + AppOrderDetailsVo appOrderDetailsVo = orderDetailsVoResultBean.getData(); + AppOrderModelInfoVo appOrderModelInfoVo = appOrderDetailsVo.getModelInfo(); + map.put("modelName", appOrderModelInfoVo.getModelName()); + File file = new File(getClass().getClassLoader().getResource("ftl/outdoor.ftl").getFile()); + String dir = getClassLoader().getResource("ftl").getPath(); + //生成word文件名 + String targetPath = docPdfComponent.getUploadTemplateUrl(); + String dateStr = DateUtil.format(new Date(), "yyyyMMdd"); + long seconds = System.currentTimeMillis(); + String typeName = dateStr + seconds + ".doc"; + WordConvertUtils.creatWord(map, file, targetPath, typeName, dir); + //新生成的word路径 + String wordPath = targetPath + typeName; + //生成出门证文件名 + String pdfName = dateStr + seconds + ".pdf"; + WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName); + return pdfName; + } + public PagerVo pagerList(PagerQuery pagerQuery) { IPage page = PagerUtil.queryToPage(pagerQuery); BusHandoverQuery params = pagerQuery.getParams(); @@ -159,6 +447,30 @@ public class BusHandoverService extends MybatisBaseService stringList = new ArrayList<>(); + DownloadVo vo = new DownloadVo(); + BuscenterFile buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.RECEIVE_CAR.getAttachType()); + vo.setName(buscenterFile.getFileName()); + vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); + stringList.add(vo); + vo = new DownloadVo(); + buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.ENTRUST_CONFIRM.getAttachType()); + vo.setName(buscenterFile.getFileName()); + vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); + stringList.add(vo); + vo = new DownloadVo(); + buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.ENTRUST.getAttachType()); + vo.setName(buscenterFile.getFileName()); + vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); + stringList.add(vo); + vo = new DownloadVo(); + buscenterFile = buscenterFileService.selectByLinkSidOne(record.getSid(), BuscenterFileEnum.EXIT_TICKET.getAttachType()); + vo.setName(buscenterFile.getFileName()); + vo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + buscenterFile.getFilePath()); + stringList.add(vo); + + record.setFileResps(stringList); + } } PagerVo p = PagerUtil.pageToVo(pagging, null); diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsMapper.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsMapper.java index e7af8e0857..c13d0abf28 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsMapper.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsMapper.java @@ -3,6 +3,8 @@ package com.yxt.anrui.buscenter.biz.bushandoveritems; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.yxt.anrui.buscenter.api.bushandover.BusHandoverInitListVo; import com.yxt.anrui.buscenter.api.bushandoveritems.BusHandoverItems; +import com.yxt.anrui.buscenter.api.bushandoveritems.BusItemVo; +import com.yxt.anrui.buscenter.api.bushandoveritems.BusItemsListVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -27,6 +29,10 @@ public interface BusHandoverItemsMapper extends BaseMapper { int updateByMainSid(@Param("sid") String sid, @Param("vinSid") String vinSid, @Param("policyImages") String policyImages,@Param("deliveryImages") String deliveryImages); + List getList(String sid); + + List getListOne(String sid); + /*IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); BusHandoverItemsVo fetchByHandoverSid(String handoverSid);*/ diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsMapper.xml b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsMapper.xml index 65bf854a80..dc85fe1d07 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsMapper.xml +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsMapper.xml @@ -31,4 +31,16 @@ WHERE handoverSid = #{sid} and vinSid = #{vinSid} + + + + \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsService.java index f4719e31e3..85c2d7b8ca 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoveritems/BusHandoverItemsService.java @@ -70,6 +70,14 @@ public class BusHandoverItemsService extends MybatisBaseService getList(String sid) { + return baseMapper.getList(sid); + } + + public List getListOne(String sid) { + return baseMapper.getListOne(sid); + } + /* private QueryWrapper createQueryWrapper(BusHandoverItemsQuery query) { QueryWrapper qw = new QueryWrapper<>(); diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busmaindeposit/BusMainDepositMapper.xml b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busmaindeposit/BusMainDepositMapper.xml index 9b85e15f77..95e8f7624f 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busmaindeposit/BusMainDepositMapper.xml +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busmaindeposit/BusMainDepositMapper.xml @@ -324,11 +324,11 @@ + select="modelLists" column="virtualSid"> - select bv.modelSid, bv.modelConfigSid as configSid, bv.modelName, bv.brandName, bv.vehicleSid from bus_deposit_vehicle bv where bv.billSid = #{virtualSid} diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/application.yml b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/application.yml index 7ed1c1cc94..520e8d076d 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/application.yml +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/application.yml @@ -26,7 +26,7 @@ server: #mybatis mybatis-plus: - mapper-locations: classpath*:**/*Mapper.xml + mapper-locations: classpath*:**Mapper.xml global-config: refresh: true db-config: diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/entrust.ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/entrust.ftl new file mode 100644 index 0000000000..41f1c91930 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/entrust.ftl @@ -0,0 +1,1097 @@ + + + + + dimengzhe + 孟哲 + 2 + 0 + 2022-11-15T09:03:00Z + 2022-11-15T09:03:00Z + 1 + 67 + 386 + 3 + 1 + 452 + 16 + + + 2052-11.1.0.12763 + A4C49D09AB054DD895DBD453249F7581 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 接收车辆委托书 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${orgName!} + + + + + + + + + + + + + + + + + + + + + (公司): + + + + + + + + + + + + + + + + + + + + + + + + + + + 委托人: + + + + + + + + + + + ${customerName!} + + + + + + + + + + 身份证号码: + + + + + + + + + + + ${idNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 受委托人姓名: + + + + + + + + + + + ${name!} + + + + + + + + + + 身份证号码: + + + + + + + + + + + ${idNumber!} + + + + + + + + + + + + + + + + + + + + + + + + + + 委托人与贵司签订了编号为 + + + + + + + + + + + + + + + + + + + + + + + ${contractNo!} + + + + + + + + + + + + + + + + + + + + 的《车辆买卖合同》 + + + + + + + + + + ,现因委托人无法亲自到场办理提车手续及提取车架号: + + + + + + + + + + + ${vinNo!} + + + + + + + + + + 的车辆。兹授权受委托人代替本委托人到贵司指定地点现场办理该车的提车手续,签订《接收车辆确认书》等相关提车文件。由此产生的相关法律后果均由本委托人承担。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 委托人签字或盖章: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 授权期限: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 日至 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/entrustConfirm.ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/entrustConfirm.ftl new file mode 100644 index 0000000000..a8f56bd1b7 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/entrustConfirm.ftl @@ -0,0 +1,1200 @@ + + + + + hp + 孟哲 + 2 + 0 + 2022-11-15T08:42:00Z + 2022-11-15T08:42:00Z + 1 + 13 + 80 + 1 + 1 + 92 + 16 + + + 2052-11.1.0.12763 + 3B16B84811D744B6BD39F9CF2DD198E0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 交车资料确认单 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 合同编号: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${contractNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 客户名称: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${customerName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 序号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 车架号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 交车资料 + + + + + <#list list as vo> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${vo_index+1!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${vo.vinNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${vo.itemValue!} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/outdoor.ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/outdoor.ftl new file mode 100644 index 0000000000..23c3833596 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/outdoor.ftl @@ -0,0 +1,1666 @@ + + + + + hp + 孟哲 + 2 + 1 + 2022-10-18T08:53:00Z + 2022-10-18T08:53:00Z + 1 + 35 + 204 + 1 + 1 + 238 + 16 + + + 2052-11.1.0.12598 + 3B16B84811D744B6BD39F9CF2DD198E0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${orgName!} + + + + + + + )出门证 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 日期: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${date!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 申请人: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${apply!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 合同编号: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${contract!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 客户名称: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${name!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 台数: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${number!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 车型名称: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${modelName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 车架号: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${vinNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 出门原因: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${reason!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 业务经办人: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${operator!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 财务经办人: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${finOperator!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 提车人: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${carCollector!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 出门签章: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${signature!} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/receiveCar.ftl b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/receiveCar.ftl new file mode 100644 index 0000000000..372e1cdc73 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/receiveCar.ftl @@ -0,0 +1,2060 @@ + + + + + dimengzhe + 孟哲 + 2 + 0 + 2022-11-15T12:04:00Z + 2022-11-15T12:04:00Z + 1 + 68 + 389 + 3 + 1 + 456 + 16 + + + 2052-11.1.0.12763 + CA081AA4E39449578713F0A9F1531F56 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 接收车辆确认书 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${useOrgName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${staffName!} + + + + + + + + + + + + + + + + + + + + + + + + + 合同编号 + + + + + + + + + + + + + + + + + + + + + + + ${contractNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${customerName!} + + + + + + + + + + + + + + + + + + + + + + + + + 身份证号 + + + + + + + + + + + + + + + + + + + + + + + ${idNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${name!} + + + + + + + + + + + + + + + + + + + + + + + + + 身份证号 + + + + + + + + + + + + + + + + + + + + + + + ${idNumber!} + + + + + + + + + + + + + + + + + + + + + + + + + + + 接收时间 + + + + + + + + + + + + + + + + + + + + + ${date!} + + + + + + + + + + + + + + + + + + + + + + + + + 接收地点 + + + + + + + + + + + + + + + + + + + + + + + + ${address!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${brandName!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${model!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 车辆型号 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${config!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${color!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 序号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发动机号 + + + + + <#list busItemsListVoList as vo> + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${vo_index+1} + + + + + + + + + + + + + + + + + + + + + + + + + + + ${vo.vinNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${vo.engineNo!} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 经验收,随车工具齐全,车辆状况良好,已接收车辆。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 接收人签字(手印)或盖章: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 联系电话: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _____ + + + + + + + + + + + + + + + + ____ + + + + + + + + + + + + + + + + ___ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerFileDDto.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerFileDDto.java new file mode 100644 index 0000000000..cf55e86622 --- /dev/null +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerFileDDto.java @@ -0,0 +1,22 @@ +package com.yxt.anrui.crm.api.crmcustomertemp; + +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @Author dimengzhe + * @Date 2022/11/16 11:56 + * @Description + */ +@Data +public class CrmCustomerFileDDto implements Dto { + private static final long serialVersionUID = -5399631895644837616L; + + private String userSid; + private String customerSid; + + private List idImages = new ArrayList<>(); +} diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java index 2111370835..ec6394e135 100644 --- a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java @@ -175,4 +175,8 @@ public interface CrmCustomerTempFeign { @ApiOperation("查询该分公司业务员下的客户列表") ResultBean> selectCustomerList(@SpringQueryMap CrmCustomerTempListQuery query); + @ResponseBody + @PostMapping("/saveFileCustomer") + @ApiOperation("合同审核通过后更新客户档案证件") + ResultBean saveFileCustomer(@RequestBody CrmCustomerFileDDto dto); } \ No newline at end of file diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java index 4a683fd234..7872b5fcf9 100644 --- a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java @@ -140,5 +140,10 @@ public class CrmCustomerTempFeignFallback implements CrmCustomerTempFeign { return null; } + @Override + public ResultBean saveFileCustomer(CrmCustomerFileDDto dto) { + return null; + } + } \ No newline at end of file diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.java index 17256ccc56..e65a8e4aef 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.java @@ -84,4 +84,6 @@ public interface CrmCustomerFileMapper extends BaseMapper { Integer selectBySid(@Param("sid") String sid); List selectIdImageByCustomerSid(@Param("customerSid") String customerSid, @Param("dataType") String dataType); + + CrmCustomerFile selectCustomerFileOne(@Param("customerSid") String customerSid, @Param("s") String s); } \ No newline at end of file diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.xml b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.xml index 3702d55673..296ba32ae0 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.xml +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.xml @@ -4,20 +4,27 @@ + select * + from crm_customer_file + where linkSid = #{customerSid} + and attachType = #{s} + \ No newline at end of file diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java index 6436b83287..814d3d944b 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java @@ -125,7 +125,7 @@ public class CrmCustomerFileService extends MybatisBaseService> bean = baseDataListFeign.selectDataList("客户"); List data = bean.getData(); for (BaseDataListVo datum : data) { @@ -324,4 +324,9 @@ public class CrmCustomerFileService extends MybatisBaseService 30){ - FNumber = FNumber.substring(0,30); + if (FNumber.length() > 30) { + FNumber = FNumber.substring(0, 30); bdCustomer.setFNumber(FNumber); - }else { + } else { bdCustomer.setFNumber(FNumber); } bdCustomers.add(bdCustomer); @@ -1169,4 +1171,30 @@ public class CrmCustomerTempService extends MybatisBaseService files = dto.getIdImages(); + for (String file : files) { + if (file.contains(fileUploadComponent.getUrlPrefix())) { + file = file.replace(fileUploadComponent.getUrlPrefix(), ""); + } + CrmFile crmFile = new CrmFile(); + crmFile.setFilePath(file); + crmFile.setLinkSid(crmCustomerFile.getSid()); + crmFile.setCreateBySid(data.getStaffSid()); + crmFile.setCreateTime(new Date()); + crmFile.setAttachType(crmCustomerFile.getAttachType()); + crmFile.setName(data.getStaffName()); + crmFileService.save(crmFile); + } + return rb.success(); + } } \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/deliveryConfirm/DeliveryDownUrlVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/deliveryConfirm/DeliveryDownUrlVo.java new file mode 100644 index 0000000000..9ca9dcbef7 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/deliveryConfirm/DeliveryDownUrlVo.java @@ -0,0 +1,17 @@ +package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/11/15 22:20 + * @Description + */ +@Data +public class DeliveryDownUrlVo implements Vo { + private static final long serialVersionUID = 4498372323265139055L; + + private String downloadUrl; + private String name; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/deliveryConfirm/DeliveryListVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/deliveryConfirm/DeliveryListVo.java index 30d27b9765..d47f4c7cef 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/deliveryConfirm/DeliveryListVo.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/deliveryConfirm/DeliveryListVo.java @@ -5,6 +5,8 @@ import com.yxt.common.core.vo.Vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * @Author dimengzhe * @Date 2022/11/14 16:16 @@ -34,4 +36,6 @@ public class DeliveryListVo implements Vo { private boolean showUpdate; @ApiModelProperty("记录sid") private String sid; + + private List fileResps; } diff --git a/doc/databases/base_tables.sql b/doc/databases/base_tables.sql index a9ce770308..8caee7577c 100644 --- a/doc/databases/base_tables.sql +++ b/doc/databases/base_tables.sql @@ -935,6 +935,36 @@ CREATE TABLE `base_vehicle_out` ) ENGINE = INNODB DEFAULT CHARSET = utf8 COMMENT ='车辆出库信息'; +DROP TABLE IF EXISTS `base_vehicle_state`; +CREATE TABLE `base_vehicle_state` +( + `id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id', + `sid` varchar(64) NOT NULL COMMENT 'sid', + `lockVersion` int(32) DEFAULT '0' COMMENT '版本锁', + `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用', + `state` int(32) DEFAULT '1' COMMENT '状态', + `isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除', + `remarks` varchar(255) DEFAULT NULL COMMENT '备注', + `createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid', + `updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid', + `vinNo` VARCHAR(64) DEFAULT NULL COMMENT '车架号', + `vinSid` varchar(64) DEFAULT NULL COMMENT '车辆sid', + `busSid` varchar(64) DEFAULT NULL COMMENT '业务sid', + `arrears` varchar(64) DEFAULT NULL COMMENT '欠款开票:1是0否', + `carArrears` varchar(64) DEFAULT NULL COMMENT '欠款提车:1是,0否', + `depositState` varchar(255) DEFAULT NULL COMMENT '款项-订金状态', + `carState` varchar(255) DEFAULT NULL COMMENT '款项-车款状态', + `invoiceState` varchar(255) DEFAULT NULL COMMENT '发票状态', + `deliverState` varchar(255) DEFAULT NULL COMMENT '交车状态', + `blueState` varchar(255) DEFAULT NULL COMMENT '蓝票来票状态', + `redState` varchar(255) DEFAULT NULL COMMENT '红票来票状态', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE = INNODB + DEFAULT CHARSET = utf8 COMMENT ='车辆业务状态表'; +