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 92bd6b2022a31d7460a119d069245f0bd777270a..297d3cb7d2ece5b0d69d125ad311b6d5b43e5a94 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 07bd9fb5b06ad6c95e5be12960cb31f1d66accf4..1c1bb339d79a32e70226cd3c1225977e2af65d14 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 66dc5e75763d7e4a583774e5a1b26be5d93b1a0c..06295a2e9eb77267513cfa5c8a2138f4bd51ab54 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 ddc2d1ebd7a4e38c01d7043ae70d8ec6662b66f8..06ed6e0e46644d3f6c5d1e16085632aee59f7674 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 @@