From 22847c88898e56a565f51ef61b64b0e8db10f269 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 27 Feb 2023 16:49:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=88=9D=E5=A7=8B=E5=8C=96(=E4=B8=8D?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=92=8C=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=8F=B7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/CustomerInitFormDTO.java | 51 +++++++++++++- .../epmet/controller/CustomerController.java | 14 +++- .../com/epmet/service/CustomerService.java | 5 ++ .../service/impl/CustomerServiceImpl.java | 69 +++++++++++++++++++ 4 files changed, 135 insertions(+), 4 deletions(-) diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/CustomerInitFormDTO.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/CustomerInitFormDTO.java index 04a40b5871..def7584d23 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/CustomerInitFormDTO.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/CustomerInitFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -12,11 +13,55 @@ import java.io.Serializable; @Data public class CustomerInitFormDTO implements Serializable { - public interface GetCustomerDetailGroup { - } + /** + * 初始化带小程序的客户 + */ + public interface InitMiniAppCustomerGroup {} + + /** + * 初始化本地客户 + */ + public interface InitLocalCustomerGroup {} - @NotBlank(message = "客户Id不能为空", groups = {GetCustomerDetailGroup.class}) + @NotBlank(message = "客户Id不能为空", groups = {InitMiniAppCustomerGroup.class}) private String customerId; + @NotNull(message = "缺少paCustomer信息", groups = InitLocalCustomerGroup.class) + private PaCustomer paCustomer; + @NotNull(message = "缺少paCustomerAgency信息", groups = InitLocalCustomerGroup.class) + private PaCustomerAgency paAgency; + @NotNull(message = "缺少paUser信息", groups = InitLocalCustomerGroup.class) + private PaUser paUser; + + + @Data + public static class PaCustomer { + private String customerName; + private String isInitialize; + private String source; + private String type; + } + + @Data + public static class PaCustomerAgency { + private String id; + private String agencyName; + private String areaCode; + private String city; + private String customerId; + private String district; + private String level; + private String levelNum; + private Integer partybranchnum; + private String province; + } + + @Data + public static class PaUser { + private String gender; + private String phone; + private String realName; + } + } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index 907ffbc967..6b3fe736cb 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -257,11 +257,23 @@ public class CustomerController { **/ @PostMapping("init") public Result init(@RequestBody CustomerInitFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, CustomerInitFormDTO.GetCustomerDetailGroup.class); + ValidatorUtils.validateEntity(formDTO, CustomerInitFormDTO.InitMiniAppCustomerGroup.class); customerService.init(formDTO); return new Result(); } + /** + * 本地初始化客户,不经过小程序 + * @param formDTO + * @return + */ + @PostMapping("initLocally") + public Result initLocally(@RequestBody CustomerInitFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, CustomerInitFormDTO.InitLocalCustomerGroup.class); + customerService.initLocal(formDTO); + return new Result(); + } + /** * desc:获取所有未删除的客户 * @return diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java index f1efa2d087..c0ae3c1309 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java @@ -166,6 +166,11 @@ public interface CustomerService extends BaseService { **/ void init(CustomerInitFormDTO formDTO); + /** + * 本地初始化(不走小程序) + */ + void initLocal(CustomerInitFormDTO input); + /** * desc:获取所有客户列表 * @return diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 856a72c96d..0c1c2a3d47 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -22,6 +22,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.rocketmq.messages.InitCustomerMQMsg; import com.epmet.commons.tools.constant.FieldConstant; @@ -585,6 +586,74 @@ public class CustomerServiceImpl extends BaseServiceImpl resultPoint = epmetPointOpenFeignClient.initPointRule(customerId); + if (!resultPoint.success()) { + throw new RenException(resultPoint.getCode(), resultPoint.getInternalMsg()); + } + + //9.新客户初始化评价指标 权重 + InitCustomerIndexForm indexForm = new InitCustomerIndexForm(); + indexForm.setCustomerId(customerId); + Result resultData = dataStatisticalOpenFeignClient.initCustomerIndex(indexForm); + if (!resultData.success()) { + throw new RenException(resultData.getCode(), resultData.getInternalMsg()); + } + //2021.1.25 end + + } + private InitCustomerMQMsg.InitCustomerStaff constructStaffInfo4CustomerInit(String agencyId, PaUserDTO paUser) { InitCustomerMQMsg.InitCustomerStaff staff = new InitCustomerMQMsg.InitCustomerStaff(); staff.setAgencyId(agencyId); From 6b9a6b098ee14511de956a00b9bafdd4e9d97788 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 27 Feb 2023 22:44:41 +0800 Subject: [PATCH 2/4] - --- .../epmet/controller/CustomerController.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index 6b3fe736cb..cc730f6223 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -264,6 +264,28 @@ public class CustomerController { /** * 本地初始化客户,不经过小程序 + * curl --location 'http://localhost:8090/oper/crm/customer/initLocally' \ + * --header 'Content-Type: application/json' \ + * --data '{ + * "paAgency": { + * "agencyName": "wxz测试001", + * "areaCode": "370666", + * "city": "青岛市", + * "district": "海马脑区", + * "level": "district", + * "levelNum": "2", + * "partybranchnum": 50, + * "province": "山东省" + * }, + * "paCustomer": { + * "customerName": "海马脑区" + * }, + * "paUser": { + * "gender": "1", + * "phone": "18560677960", + * "realName": "wang" + * } + * }' * @param formDTO * @return */ From 0bcd4ad9a558ee21ea7f577fbd73ad2a7ab3ca20 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 28 Feb 2023 09:34:29 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0minio=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/enums/OssTypeEnum.java | 6 +- .../epmet-oss/epmet-oss-server/pom.xml | 6 + .../com/epmet/cloud/CloudStorageConfig.java | 39 +++++++ .../com/epmet/cloud/MinioStorageService.java | 106 ++++++++++++++++++ .../main/java/com/epmet/cloud/OssFactory.java | 2 + 5 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/MinioStorageService.java diff --git a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/enums/OssTypeEnum.java b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/enums/OssTypeEnum.java index 1c43b7e121..6bb92ad38b 100644 --- a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/enums/OssTypeEnum.java +++ b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/enums/OssTypeEnum.java @@ -34,7 +34,11 @@ public enum OssTypeEnum { /** * 本地 */ - LOCAL(5); + LOCAL(5), + /** + * minio + */ + MINIO(6); private int value; diff --git a/epmet-module/epmet-oss/epmet-oss-server/pom.xml b/epmet-module/epmet-oss/epmet-oss-server/pom.xml index 951ea10bce..70b1540633 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/pom.xml +++ b/epmet-module/epmet-oss/epmet-oss-server/pom.xml @@ -90,6 +90,12 @@ org.springframework spring-test + + + io.minio + minio + 8.4.2 + diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java index 9cd575cbcf..65e58c6a50 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java @@ -11,9 +11,11 @@ package com.epmet.cloud; import com.epmet.commons.tools.validator.group.AliyunGroup; import com.epmet.commons.tools.validator.group.QcloudGroup; import com.epmet.commons.tools.validator.group.QiniuGroup; +import com.epmet.constants.PrivacyType; import com.epmet.validator.group.FastDFSGroup; import com.epmet.validator.group.LocalGroup; import lombok.Data; +import org.apache.commons.lang3.StringUtils; import org.hibernate.validator.constraints.Range; import org.hibernate.validator.constraints.URL; @@ -101,6 +103,9 @@ public class CloudStorageConfig implements Serializable { private String localPath; private AliyunCloudStorageConfig aliyun; + + private MinioStorageConfig minio; + /** * 阿里云存储配置 */ @@ -110,6 +115,20 @@ public class CloudStorageConfig implements Serializable { private AliyunCloudStorageConfigProps external; } + @Data + public static class MinioStorageConfig { + private MinioStorageConfigProps internal; + private MinioStorageConfigProps external; + + public MinioStorageConfigProps getConfigByPrivacy(String privacy) { + if (StringUtils.isNotBlank(privacy) && PrivacyType.INTERNAL.equals(privacy)) { + return internal; + } else { + return external; + } + } + } + /** * 阿里云存储配置属性 */ @@ -134,4 +153,24 @@ public class CloudStorageConfig implements Serializable { private String aliyunBucketName; } + /** + * minio存储配置属性 + */ + @Data + public static class MinioStorageConfigProps { + /** + * 外部访问域名,用于用户直接访问minio服务 + */ + private String minioExternalDomain; + /** + * 内部访问域名,用于服务集群内部使用 + */ + private String minioInternalDomain; + private String minioEndPoint; + private String minioAccessKey; + private String minioSecretKey; + private String minioPrefix; + private String minioBucketName; + } + } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/MinioStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/MinioStorageService.java new file mode 100644 index 0000000000..e9204c3623 --- /dev/null +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/MinioStorageService.java @@ -0,0 +1,106 @@ +package com.epmet.cloud; + +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import io.minio.MinioClient; +import io.minio.ObjectWriteResponse; +import io.minio.PutObjectArgs; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.MediaType; +import org.springframework.http.MediaTypeFactory; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Paths; + +/** + * minio 文件服务 + */ +@Slf4j +public class MinioStorageService extends AbstractCloudStorageService { + + private MinioClient minioClient; + + public MinioStorageService(CloudStorageConfig config) { + this.config = config; + + CloudStorageConfig.MinioStorageConfigProps props = config.getMinio().getConfigByPrivacy(null); + + log.info("Minio客户端连接所用的域名:{}", props.getMinioInternalDomain()); + + /** + * minio和服务在同一个局域网,则可以使用内网域名上传,速度更快更稳定 + */ + minioClient = MinioClient.builder() + .endpoint(props.getMinioInternalDomain()) // 保证和nginx的proxy_set_header Host 一致 + .credentials(props.getMinioAccessKey(), props.getMinioSecretKey()) + .build(); + } + + @Override + public String getOssDomain(String privacy) { + return this.config.getMinio().getConfigByPrivacy(privacy).getMinioExternalDomain(); + } + + @Override + public String getOssPrefix(String privacy) { + return this.config.getMinio().getConfigByPrivacy(privacy).getMinioPrefix(); + } + + @Override + public String upload(byte[] data, String path, String privacyType) { + return upload(new ByteArrayInputStream(data), path, privacyType); + } + + @Override + public String uploadSuffix(byte[] data, String suffix, String privacyType) { + return uploadSuffix(new ByteArrayInputStream(data), suffix, privacyType); + } + + /** + * 此处bucket已经做为path + * @param inputStream 字节流 + * @param path 文件路径,包含文件名 + * @param privacyType + * @return + */ + @Override + public String upload(InputStream inputStream, String path, String privacyType) { + CloudStorageConfig.MinioStorageConfigProps props = this.config.getMinio().getConfigByPrivacy(privacyType); + String contentType = MediaTypeFactory.getMediaType(path).orElse(MediaType.APPLICATION_OCTET_STREAM).toString(); + try { + ObjectWriteResponse resp = minioClient.putObject(PutObjectArgs.builder() + .bucket(props.getMinioBucketName()) + .object(path) + .stream(inputStream, inputStream.available(), -1) + .contentType(contentType) + .build()); + + log.debug("minio上传文件成功。bucket:{}, object:{}, privacyType:{}", resp.bucket(), resp.object(), privacyType); + + // 返回值要存储到数据库,供用户访问,因此使用外网域名 + return props.getMinioExternalDomain() + "/" + Paths.get(resp.bucket()).resolve(resp.object()).toString(); + } catch (Exception e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), errorMsg); + } + } + + @Override + public String uploadSuffix(InputStream inputStream, String suffix, String privacyType) { + CloudStorageConfig.MinioStorageConfigProps props = this.config.getMinio().getConfigByPrivacy(privacyType); + return upload(inputStream, getPath(props.getMinioPrefix(), suffix, privacyType), privacyType); + } + + @Override + public void down(String privacyType) throws IOException { + + } + + @Override + public boolean delete(String objectName, String privacyType) { + return false; + } +} diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/OssFactory.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/OssFactory.java index 3d69543784..a9113d5fba 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/OssFactory.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/OssFactory.java @@ -40,6 +40,8 @@ public final class OssFactory { abstractCloudStorageService = new FastDFSCloudStorageService(config); }else if(config.getType() == OssTypeEnum.LOCAL.value()){ abstractCloudStorageService = new LocalCloudStorageService(config); + }else if(config.getType() == OssTypeEnum.MINIO.value()){ + abstractCloudStorageService = new MinioStorageService(config); } } return abstractCloudStorageService; From 0e6f44b0a8451dbb68303d1e8631c165bdbe02e8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Feb 2023 09:36:04 +0800 Subject: [PATCH 4/4] bugfix --- .../service/impl/ActInfoServiceImpl.java | 10 ++++------ .../service/impl/IcPartyUnitServiceImpl.java | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index 388594a48b..0036e17a81 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.constant.ActConstant; import com.epmet.dao.ActInfoDao; import com.epmet.dao.ActUserRelationDao; @@ -66,16 +67,13 @@ public class ActInfoServiceImpl extends BaseServiceImpl option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + Map option = SpringContextUtils.getBean(IcPartyUnitService.class).option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); List unitIds = icActivityUnitRelationService.getUnitList(dto.getId()); List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); detailResultDTO.setUnitIdList(unitIds); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 07014bd72c..d0d8c5d541 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -44,6 +44,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.FileUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.constant.UserDemandConstant; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcPartyUnitDao; @@ -99,16 +100,16 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId()); Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取单位积分 - Map pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); + Map pointMap = SpringContextUtils.getBean(IcUserDemandRecService.class).getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); dtoList.forEach(item -> { item.setTypeName(unitTypeMap.getData().get(item.getType())); //这是错误的,应该是赋值type,遗留bug, 先不改了.... @@ -180,7 +181,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId()); Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取单位积分 - Map pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); + Map pointMap = SpringContextUtils.getBean(IcUserDemandRecService.class).getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); dtoList.forEach(item -> { item.setTypeName(unitTypeMap.getData().get(item.getType())); //这是错误的,应该是赋值type,遗留bug, 先不改了.... @@ -211,7 +212,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl pointMap = icUserDemandRecService.getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT); + Map pointMap = SpringContextUtils.getBean(IcUserDemandRecService.class).getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT); dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA))); dto.setScore(null == pointMap.get(id) ? NumConstant.ZERO : pointMap.get(id)); // 分类名称 @@ -271,7 +272,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + if (SpringContextUtils.getBean(IcUserDemandRecService.class).selectCountByServerId(id) > NumConstant.ZERO) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未完成的服务", "存在未完成的服务,不能删除"); } //校验是否有同步到通讯录,是否存在工作人员下有未处理项目数据【联建单位被同步到通讯录部门的,如果部门下人员存在未办结项目则不允许删除】 @@ -438,7 +439,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl list = icUserDemandRecService.groupByServer(formDTO.getCustomerId(), formDTO.getServerId(), formDTO.getServiceType()); + List list = SpringContextUtils.getBean(IcUserDemandRecService.class).groupByServer(formDTO.getCustomerId(), formDTO.getServerId(), formDTO.getServiceType()); for (ServiceStatDTO serviceStatDTO : list) { if (0 != serviceStatDTO.getDemandCount()) { BigDecimal result = serviceStatDTO.getTotalScore().divide(new BigDecimal(serviceStatDTO.getDemandCount()), 4, BigDecimal.ROUND_HALF_UP);