From f0fb9e2cb3cbe3de99fdab08946c23330d742964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B3=95=E6=8B=8951246?= <719602854@qq.com> Date: Sat, 14 Jun 2025 16:20:48 +0800 Subject: [PATCH] 1 --- .../admin/info/vo/InfoPageReqVO.java | 3 ++ .../visit/dal/mysql/info/InfoMapper.java | 1 + .../visit/service/info/InfoServiceImpl.java | 39 ++++++++++--------- .../src/views/system/role/index.vue | 20 +++++----- .../src/views/visit/info/index.vue | 14 ++++++- .../src/views/visit/util/PrintContent.vue | 2 +- 6 files changed, 49 insertions(+), 30 deletions(-) diff --git a/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/controller/admin/info/vo/InfoPageReqVO.java b/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/controller/admin/info/vo/InfoPageReqVO.java index 92bd6b2..297d3cb 100644 --- a/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/controller/admin/info/vo/InfoPageReqVO.java +++ b/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/controller/admin/info/vo/InfoPageReqVO.java @@ -53,4 +53,7 @@ public class InfoPageReqVO extends PageParam { @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; + @Schema(description = "业务经理") + private String creator; + } \ No newline at end of file diff --git a/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/dal/mysql/info/InfoMapper.java b/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/dal/mysql/info/InfoMapper.java index 07bd9fb..1c1bb33 100644 --- a/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/dal/mysql/info/InfoMapper.java +++ b/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/dal/mysql/info/InfoMapper.java @@ -31,6 +31,7 @@ public interface InfoMapper extends BaseMapperX { .eqIfPresent(InfoDO::getVisitType, reqVO.getVisitType()) .eqIfPresent(InfoDO::getCompanyId,companyId) .betweenIfPresent(InfoDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(InfoDO::getCreator,reqVO.getCreator()) .orderByDesc(InfoDO::getVisitDate)); } default PageResult selectHomePage(InfoPageReqVO reqVO) { diff --git a/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/service/info/InfoServiceImpl.java b/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/service/info/InfoServiceImpl.java index 66dc5e7..06295a2 100644 --- a/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/service/info/InfoServiceImpl.java +++ b/yudao-module-visit/src/main/java/cn/iocoder/yudao/module/visit/service/info/InfoServiceImpl.java @@ -284,7 +284,6 @@ public class InfoServiceImpl implements InfoService { //现根据客户名称获取历史拜访记录 List info = infoMapper.selectByCompanyName(companyName); if (info != null && !info.isEmpty()){ - Long companyId = info.get(0).getCompanyId(); //取最近四次 info = info.stream() // 筛选本月记录(基于 LocalDateTime) @@ -313,13 +312,15 @@ public class InfoServiceImpl implements InfoService { visitDateList.add(infoDO.getVisitDate().toLocalDate()); }); //下面获取客户信息 - CustomerInfoDO customerInfoDO = customerInfoMapper.selectByCompanyName(companyName,companyId);//这个companyId是从根据companyId获取得数据List中获取得,一定和点得这条匹配 - infoPrintVO.setVisitProductNames(customerInfoDO.getProductNames());//本次拜访品种 - infoPrintVO.setCompanyName(customerInfoDO.getCompanyName());//公司名称 - infoPrintVO.setSalesman(customerInfoDO.getCreator());//拜访记录的创建者就是该记录的业务员 - infoPrintVO.setLocationImage(customerInfoDO.getLocationImage());//公司定位图 - infoPrintVO.setContact(customerInfoDO.getContact()); - infoPrintVO.setDepartment(customerInfoDO.getDepartment()); +// CustomerInfoDO customerInfoDO = customerInfoMapper.selectByCompanyName(companyName,companyId);//这个companyId是从根据companyId获取得数据List中获取得,一定和点得这条匹配 + //根据第一条数据去展示 + InfoDO infoDO1 = info.get(0); + infoPrintVO.setVisitProductNames(infoDO1.getVisitProductNames());//本次拜访品种 + infoPrintVO.setCompanyName(infoDO1.getCompanyName());//公司名称 + infoPrintVO.setSalesman(infoDO1.getCreator());//拜访记录的创建者就是该记录的业务员 + infoPrintVO.setLocationImage(infoDO1.getLocationImage());//公司定位图 + infoPrintVO.setContact(infoDO1.getContact()); + infoPrintVO.setDepartment(infoDO1.getDepartment()); //添加多次的信息 infoPrintVO.setServiceContent(serviceContent); infoPrintVO.setVisitDate(visitDateList); @@ -361,8 +362,8 @@ public class InfoServiceImpl implements InfoService { //拜访时间记录 List visitDateList = new ArrayList<>(); //以第一个公司名称作为合并打印的公司 - String companyName = info.get(0).getCompanyName(); - Long companyId = info.get(0).getCompanyId(); +// String companyName = info.get(0).getCompanyName(); +// Long companyId = info.get(0).getCompanyId(); //取最多4张服务图片 int maxImages = 4; for (InfoDO infoDO : info) { @@ -384,14 +385,16 @@ public class InfoServiceImpl implements InfoService { }); //下面获取客户信息 InfoPrintVO infoPrintVO = new InfoPrintVO(); - CustomerInfoDO customerInfoDO = customerInfoMapper.selectByCompanyName(companyName,companyId); - if (customerInfoDO != null){ - infoPrintVO.setVisitProductNames(customerInfoDO.getProductNames());//本次拜访品种 - infoPrintVO.setCompanyName(customerInfoDO.getCompanyName());//公司名称 - infoPrintVO.setSalesman(customerInfoDO.getCreator());//拜访记录的创建者就是该记录的业务员 - infoPrintVO.setLocationImage(customerInfoDO.getLocationImage());//公司定位图 - infoPrintVO.setContact(customerInfoDO.getContact()); - infoPrintVO.setDepartment(customerInfoDO.getDepartment()); +// CustomerInfoDO customerInfoDO = customerInfoMapper.selectByCompanyName(companyName,companyId); + InfoDO infoDO = info.get(0); + + if (infoDO != null){ + infoPrintVO.setVisitProductNames(infoDO.getVisitProductNames());//本次拜访品种 + infoPrintVO.setCompanyName(infoDO.getCompanyName());//公司名称 + infoPrintVO.setSalesman(infoDO.getCreator());//拜访记录的创建者就是该记录的业务员 + infoPrintVO.setLocationImage(infoDO.getLocationImage());//公司定位图 + infoPrintVO.setContact(infoDO.getContact()); + infoPrintVO.setDepartment(infoDO.getDepartment()); } //添加多次的信息 infoPrintVO.setServiceContent(serviceContent); diff --git a/yudao-ui/yudao-ui-admin-vue3/src/views/system/role/index.vue b/yudao-ui/yudao-ui-admin-vue3/src/views/system/role/index.vue index ddc2d1e..06ed6e0 100644 --- a/yudao-ui/yudao-ui-admin-vue3/src/views/system/role/index.vue +++ b/yudao-ui/yudao-ui-admin-vue3/src/views/system/role/index.vue @@ -125,16 +125,16 @@ > 菜单权限 - - 数据权限 - + + + + + + + + + + + + + + @@ -201,6 +211,7 @@ + @@ -258,7 +269,7 @@